[python]Paramiko’s SSHClient

Paramiko SSH client I wrote a sub class from paramiko in order add on functionality to assist myself to work with Ansible AWX 9.2.0 (dockerless version). The subclass works with my CentOS which hosts the Ansible AWX, the purpose is to use the SSHClient class to download and upload playbooks, check the existence of project … Continue reading [python]Paramiko’s SSHClient


[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 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 ubs1 ubs2 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