Permalink
Browse files

Ansible 2.0 syntax on steps 0,1,2

  • Loading branch information...
bernardoVale committed Jan 29, 2016
1 parent f453013 commit 9a148a4f3cc3b7909166ad8f704f1953029322cb
Showing with 14 additions and 14 deletions.
  1. +1 −1 step-00/README.md
  2. +2 −2 step-00/setup.yml
  3. +5 −5 step-01/README.md
  4. +3 −3 step-01/hosts
  5. +3 −3 step-02/hosts
View
@@ -49,7 +49,7 @@ Ansible is perfect for this and we will use it for the job. However I won't
explain what's happening for now. Just trust me.
```bash
ansible-playbook -c paramiko -i step-00/hosts step-00/setup.yml --ask-pass --sudo
ansible-playbook -c paramiko -i step-00/hosts step-00/setup.yml --ask-pass --become
```
View
@@ -1,6 +1,6 @@
- hosts: all
sudo: yes
remote_user: vagrant
become: yes
become_user: vagrant
tasks:
# This should work too / #2372
View
@@ -11,17 +11,17 @@ flag in ansible commands an provide the inventory path.
We've created an inventory file for you in the directory that looks like this:
```bash
host0.example.org ansible_ssh_host=192.168.33.10 ansible_ssh_user=root
host1.example.org ansible_ssh_host=192.168.33.11 ansible_ssh_user=root
host2.example.org ansible_ssh_host=192.168.33.12 ansible_ssh_user=root
host0.example.org ansible_host=192.168.33.10 ansible_user=root
host1.example.org ansible_host=192.168.33.11 ansible_user=root
host2.example.org ansible_host=192.168.33.12 ansible_user=root
```
`ansible_ssh_host` is a special _variable_ that sets the IP ansible will use
`ansible_host` is a special _variable_ that sets the IP ansible will use
when trying to connect to this host. It's not necessary here if you use the
vagrant-hostmaster gem. Also, you'll have to change the IPs if you have set
up your own virtual machines with different addresses.
`ansible_ssh_user` is another special _variable_ that tells ansible to
`ansible_user` is another special _variable_ that tells ansible to
connect as this user when using ssh. By default ansible would use your
current username, or use another default provided in ~/.ansible.cfg
(`remote_user`).
View
@@ -1,3 +1,3 @@
host0.example.org ansible_ssh_host=192.168.33.10 ansible_ssh_user=root
host1.example.org ansible_ssh_host=192.168.33.11 ansible_ssh_user=root
host2.example.org ansible_ssh_host=192.168.33.12 ansible_ssh_user=root
host0.example.org ansible_host=192.168.33.10 ansible_user=root
host1.example.org ansible_host=192.168.33.11 ansible_user=root
host2.example.org ansible_host=192.168.33.12 ansible_user=root
View
@@ -1,3 +1,3 @@
host0.example.org ansible_ssh_host=192.168.33.10 ansible_ssh_user=root
host1.example.org ansible_ssh_host=192.168.33.11 ansible_ssh_user=root
host2.example.org ansible_ssh_host=192.168.33.12 ansible_ssh_user=root
host0.example.org ansible_host=192.168.33.10 ansible_user=root
host1.example.org ansible_host=192.168.33.11 ansible_user=root
host2.example.org ansible_host=192.168.33.12 ansible_user=root

0 comments on commit 9a148a4

Please sign in to comment.