Commit e4cdb9d3 authored by JackV's avatar JackV

Add ansible section

parent 4143719d
......@@ -459,6 +459,79 @@ configuration that might help to debug problems.
---
## What is Ansible?
Ansible is a declarative configuration managment tool
Strong points:
* Only Python and SSH need to be installed to have a machine
be controlled by Ansible
* Idempotent (multiple runs have the same result as one)
* Declarative/Stateless - what is on the config files dictates the end result
---
## What can you do with ansible?
* Maintain consistent configurations across machines
* Have all your machines have a set of installed packages
* Manage installation/upgrade of services in a reproducible way
---
## Basic ansible terms
* **inventory**: defines hosts and their grouping
* **playbook**: describes what operations to do on the hosts
* **task**: defines the single operation to execute
---
## Anatony of an inventory
```ini
[webservers]
web.example.org
web[1-4].example.org
[motd]
192.168.0.1
[motd:children]
webservers
```
---
## Anatomy of a task
```yaml
name: "Install webserver"
apk:
name: lighttpd
state: latest
```
---
## Anatomy of a playbook
```yaml
---
- hosts: webservers
remote_user: root
tasks:
- name: install webserver
apk:
name: lighthttpd
state: latest
- name: start webserver
service:
name: lighthttpd
state: started
enabled: yes
```
----
# Beyond the cloud
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment