RH294 Ch 2: Managed Nodes and Inventories

WebAsha is moving its servers to Ansible. Set up the project on control so the `devops` automation account can reach all four nodes with SSH keys and become root without a password.

Tasks

  1. Create ~/ansible/inventory: node1 in group dev, node2 in test, node3 and node4 in prod, and a group webservers whose child group is prod.
  2. Create ~/ansible/ansible.cfg that uses that inventory, connects as devops, and escalates privilege with sudo by default.
  3. Generate an SSH key for student and copy it to devops on all four nodes (password devops).
  4. On every node, let devops run any command with sudo without a password, using a file in /etc/sudoers.d.
  5. Prove it works: ansible all -m ping and ansible all -m command -a id (which must show uid=0(root)) succeed from ~/ansible.