⇤ ← Revision 1 as of 2018-02-22 01:01:35
Size: 552
Comment:
|
Size: 928
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 12: | Line 12: |
{{{ | {{{#!highlight yaml |
Line 25: | Line 25: |
or specify hosts: all: {{{#!highlight yaml - hosts: all become: yes become_user: root tasks: - name: Install Nginx apt: name: nginx state: installed update_cache: true }}} and then invoke ansible with: {{{#!highlight sh numbers=off ansible-playbook -i 'localhost,' -c local Playbook.ansible.yml }}} |
Installing ansible
Toggle line numbers
# Official PPA for Ubuntu
sudo apt-add-repository -y ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -y ansible
Playbooks meant to only be run locally
or specify hosts: all:
and then invoke ansible with:
Toggle line numbers
ansible-playbook -i 'localhost,' -c local Playbook.ansible.yml