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

Ansible: An Introduction to Automation - OLF 2017

Chris Laco
September 27, 2017

Ansible: An Introduction to Automation - OLF 2017

Chris Laco

September 27, 2017
Tweet

More Decks by Chris Laco

Other Decks in Technology

Transcript

  1. –Wikipedia “…the process of preparing and equipping a [resource] to

    allow to provide (new) services to its users” What is Ansible? “Provisioning”
  2. –Wikipedia “…the automated arrangement, coordination, and management of computers systems,

    middleware, and services.” What is Ansible? “Orchestration”
  3. –Wikipedia “…a systems engineering process for establishing and maintaining consistency

    of a product’s performance, functional, and physical attributes with its requirements, design, and operational information throughout its life.” What is Ansible? “Configuration Management”
  4. –Ansible “Deploy apps. Manage systems. Crush complexity. Ansible helps you

    build a strong foundation for DevOps” What is Ansible? “AUTOMATION FOR EVERYONE”
  5. What Kinds of Things? • Cloud Resources: AWS, Rackspace, Azure,

    Google, Digital Ocean, OpenStack, VMWare, Servers, Containers, Storage • Networking: Cisco, Cumulous, F5, Juniper, OpenSwitch • Databases: MySQL, Postgresql, MS SQL. Mongo, Redis • Everything: Over 750 modules!
  6. How Does It Work? • Agentless: No agent or client

    to install on remote resources* • Connect: SSH to resources, or run modules locally • Send Payload: SFTP/SCP modules to remote resources • Execute: Run the modules to perform desired actions • Report: Return output about the actions performed
  7. Ansible Moving Parts • Inventory: Phonebook of resources you are

    going to manage • Variables: Options to control how things are managed • Modules: Reusable code designed to manage things • Tasks: Combine variables and modules into a unit of work • Roles: Combine multiple tasks into a reusable unit of work • Playbooks: Define how to run tasks and roles on inventory • Vault: Encrypt any or all of the above things to protect secrets
  8. Ansible Moving Parts • Inventory: web_server_1 (10.10.10.10) • Variables: apache_version

    (2.3.1), web_site_port (80) • Modules: apt, template, service • Tasks: apt (install), template (configure site), service (restart) • Roles: web_server (run apt, template, service with variables) • Playbooks: run web_server role on web_server_1 • Vault: encrypt ssl private key or .htaccess file contents