CORRECT TEXT

Posted by: Pdfprep Category: EX294 Tags: , ,

CORRECT TEXT

Install and configure ansible

User sandy has been created on your control node with the appropriate permissions already, do not change or modify ssh keys. Install the necessary packages to run ansible on the control node. Configure ansible.cfg to be in folder /home/sandy/ansible/ansible.cfg and configure to access remote machines via the sandy user. All roles should be in the path /home/sandy/ansible/roles. The inventory path should be in /home/sandy/ansible/invenlory.

You will have access to 5 nodes.

node1.example.com

node2.example.com

node3.example.com

node4.example.com

node5.example.com

Configure these nodes to be in an inventory file where node I is a member of group dev. nodc2 is a member of group test, node3 is a member of group proxy, nodc4 and node 5 are members of group prod. Also, prod is a member of group webservers.

Answer: In/home/sandy/ansible/ansible.cfg [defaults]

inventory=/home/sandy/ansible/inventory roles_path=/home/sandy/ansible/roles remote_user= sandy host_key_checking=false

[privilegeescalation]

become=true become_user=root become_method=sudo become_ask_pass=false

In /home/sandy/ansible/inventory

[dev] node1 .example.com [test] node2.example.com [proxy] node3 .example.com [prod] node4.example.com node5 .example.com [webservers:children] prod

Leave a Reply

Your email address will not be published.