How to Install Ansible on Linux RHEL 7 with Subscription
Description
How to Install Ansible on Linux RHEL 7 with Subscription - Ansible is an extra-simple tool/framework/API for doing 'remote things'. this command allows you to define and run a single task 'playbook' against a set of hosts.
Preparation
Before installing you are required to enable the repository that you get when buying rhel 7, and the epel repository to take ansible from a third party in the following ways:
# subscription-manager register --username kitsake --password password --auto-attach --force # subscription-manager repos --enable rhel-7-server-ansible-2.9-rpms
Installing
# yum install ansible
Install Ansible in Linux RHEL 7 |
After finishing installing Ansible you can make sure that Ansible has been installed by looking at the version.
# ansible --version
Configure
let's try ansible by simply ordering a basic command to see the disk in the client.
so that ansible can run to the client, it is required that from server to client, they can log in without a password.
If you can't, you can follow the method first here: How to Setup SSH Login Without Password on RHEL 7
Continue to the next step, you must register the hosts client in the ansible settings.
# vi /etc/ansible/hosts
......
[webservers]
192.168.79.146
.....
save & exit
Trying
After you have done what follows from the explanation above. it's time for you to try it on the server that was installed earlier.
# ansible -m command -a "df -hT" -u root webservers
trying command check disk with ansible |
FYI : You can see examples of playbooks in several references. I recommend that you just look here Ansible Galaxy to see more examples of playbooks.
Post a Comment for "How to Install Ansible on Linux RHEL 7 with Subscription"
Post a Comment