Skip to content
Snippets Groups Projects
Commit 57f14cfc authored by Moises Sacal's avatar Moises Sacal
Browse files

Update README.md

parent c5704fb6
Branches
No related merge requests found
......@@ -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
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment