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

Configuration Management with Ansible

Configuration Management with Ansible

Learn how to manage and deploy on servers using Ansible

Celestine Omin

June 12, 2016
Tweet

More Decks by Celestine Omin

Other Decks in Technology

Transcript

  1. What is Ansbile? “Ansible is a free-software platform for configuring

    and managing computers which combines multi-node software deployment, ad hoc task execution, and configuration management.” ~ Wikipedia
  2. Configuration management, what’s that? “Configuration management (CM) is 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” ~ Wikipedia
  3. Why Ansible? 1. Unlike the rest, especially the really popular

    Chef, Ansible is agentless. It only requires standard SSH connection. 2. Idempotency.
  4. Commands ansible all –m ping –u celestine ansible all -m

    shell -a "ping -c3 localhost" -u celestine
  5. Playbooks Playbooks are Ansible’s configuration, deployment, and orchestration language. They

    can describe a policy you want your remote systems to enforce, or a set of steps in a general IT process.
  6. Playbooks - What makes up a playbook Roles – tasks,

    handlers, files, templates, vars Group_vars
  7. Roles – Tasks – main.yml ---- - name: Add Nginx

    Repository apt_repository: repo='ppa:nginx/stable' state=present - name: Install Nginx apt: name=nginx state=latest update_cache=true notify: Start Nginx
  8. Roles – Handlers – main.yml ---- - name: Start Nginx

    service: name=nginx state=started - name: Reload Nginx service: name=nginx state=reloaded