From 57f14cfc31276463da03557e1fb6fb87a461d690 Mon Sep 17 00:00:00 2001 From: Moises Sacal <moises.sacal@uts.edu.au> Date: Tue, 9 Oct 2018 16:52:53 +1100 Subject: [PATCH] Update README.md --- README.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index daa94a9..6afa81d 100644 --- a/README.md +++ b/README.md @@ -8,22 +8,30 @@ Control Node: Any machine with Ansible installed. You can run commands and playb Managed Node: Any machine with Ansible installed. You can run commands and playbooks -Step 1. Managed Node: Modify visudo +#### Step 1. Managed Node: Modify visudo Ansible needs to run commands as sudo without password `sudo visudo` -Find and uncomment -This line -`%wheel ALL=(ALL) NOPASSWD: ALL` +Find and uncomment the next line: + +`#%wheel ALL=(ALL) ALL` + +to: + +`%wheel ALL=(ALL) ALL` + +And + +`#%wheel ALL=(ALL) NOPASSWD: ALL` to: -`wheel ALL=(ALL) NOPASSWD: ALL` +`%wheel ALL=(ALL) NOPASSWD: ALL` -Step 2. Control Node: ansible.cfg +#### Step 2. Control Node: ansible.cfg ``` [defaults] @@ -31,7 +39,7 @@ inventory = ./hosts.live remote_user = <THE USERNAME THAT IS GOING TO RUN Ansible Scripts> ``` -Step 2. Managed Node: (SKIP if you already have one) Create an ssh key +#### Step 3. Managed Node: (SKIP if you already have one) Create an ssh key Add user ansible ``` @@ -55,7 +63,7 @@ sudo chmod 700 /home/ansible/.ssh/authorized_keys sudo chown -R ansible:ansible /home/ansible sudo cat $(pwd)/keys/HOSTNAME.id_rsa.pub >> /home/ansible/.ssh/authorized_keys -Step 3. Control Node: Add this key to host.live (Defined in ansible.cfg) +#### Step 4. Control Node: Add this key to host.live (Defined in ansible.cfg) ``` [myremotemachine] @@ -65,7 +73,7 @@ Step 3. Control Node: Add this key to host.live (Defined in ansible.cfg) `ansible_ssh_private_key_file=keys/myremotemachine.id_rsa` ``` -Step 4. Managed Node: Install Ansible +#### Step 5. Managed Node: Install Ansible ``` wget --output-document /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py @@ -73,7 +81,7 @@ sudo python /tmp/get-pip.py sudo pip install ansible ``` -Step 4. Control Node: Verify this by running ansible all -m ping +#### Step 6. Control Node: Verify this by running ansible all -m ping $ `ansible all -m ping` ```bash -- GitLab