Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ansible 101 - The Basics

chrisL
July 09, 2014

Ansible 101 - The Basics

Walk through Ansible basics like install, directories layouts, shells, templates and how to verify everything before you run a playbook.

chrisL

July 09, 2014
Tweet

More Decks by chrisL

Other Decks in Technology

Transcript

  1. ssh’in pineApplez>ansibles $cat ansible_hosts # Ansible Hosts [digiocean] NYPupMaster NYPupDB

    NYPupConsole dockpress [digiocean:dockers] dockpress [amazons] [vagrants] pineApplez>ansibles $cat ~/.ssh/config Host copperdogemuchminer Hostname 107.170.225.89 Port 22 User copper IdentityFile /Users/spudBud/.ssh/digiocean/keydigiz Host dockpress Hostname 192.241.217.104 User chrisl IdentityFile /Users/spudBud/.ssh/digiocean/keydigiz
  2. template group_vars/ all roles/ common/ handlers/ main.yml tasks/ main.yml templates/

    hosts.j2 vars/ main.yml pupconsole/ pupdb/ pupmaster hosts site.yml LICENSE README.md
  3. just ansible verify ssh & ansible & hosts is happy

    pineApplez>Ansible-PuppetEnterprise $ansible -i hosts all -m ping -u root NYPupMaster | success >> { "changed": false, "ping": "pong" } NYPupConsole | success >> { "changed": false, "ping": "pong" } NYPupDB | success >> { "changed": false, "ping": "pong" }