[ansible]apt update && apt install tree

This can be applied to install package from apt repo. I have three ubuntu servers under the group linux. YAML file Reference: https://docs.ansible.com/ansible/latest/modules/apt_module.html Execution Result The ansible python script is sent from the control node to the ubuntu servers, this is the default behaviour, unless the connection is like network_cli then the control node executes … Continue reading [ansible]apt update && apt install tree

[ansible] Doing useradd with multiple linux servers

Inventory [linux] ubs1 ubs2 ubs3 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.1.25 ubs1 192.168.1.26 ubs2 192.168.1.27 ubs3 There are predefined linux servers hostnames, these hostnames have to be within the /etc/ansible/hosts in order to execute the yaml. Yaml for creating user I used an online mkpasswd to generate the hash for … Continue reading [ansible] Doing useradd with multiple linux servers

[python]Show version with Ansible

Introduction These python scripts do the following: init_vault.py, initialized the vault and create an encryption key. The initialization creates 5 keys and 1 root token for unsealing and login the vault respectively. get_vault_resuly.py, this script gets the keys and token to unseal and login the vault. vault_mgmt.py, this script gets the key and value pair … Continue reading [python]Show version with Ansible