#########################################################################################
#########################################################################################
GOAL:
Ansible can be useful in some cases. Let's see how to install it on the control plane.
We first need to install the Python package manager, followed by Ansible and the NetApp python library.
dnf install -y python-pip
pip install ansible-core==2.15.13 netapp-libLast, we will install the NetApp ONTAP Collection from the Ansible Galaxy.
$ ansible-galaxy collection install git+https://github.com/ansible-collections/netapp.ontap.git --ignore-certs
Process install dependency map
Starting collection install process
Installing 'netapp.ontap:23.4.0' to '/root/.ansible/collections/ansible_collections/netapp/ontap'
Created collection for netapp.ontap:23.4.0 at /root/.ansible/collections/ansible_collections/netapp/ontap
netapp.ontap:23.4.0 was installed successfullyNow that Ansible is installed, let's configure the host file
$ mkdir /etc/ansible
$ cat <<EOT > /etc/ansible/hosts
[kubernetes]
rhel[1:3]
[kube-master]
rhel3
EOTWe will now make sure that Ansible works & each node can be used.
$ ansible -m ping kubernetes
rhel2 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
},
"changed": false,
"ping": "pong"
}
rhel1 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
},
"changed": false,
"ping": "pong"
}
rhel3 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
},
"changed": false,
"ping": "pong"
}Back to the frontpage?