2. Installation
● If you do not have ansible installed yet, please
do it now:
http://docs.ansible.com/ansible/intro_installation
.html#installing-the-control-machine
● We will need the git, too.
● It should be included on USB stick in virtual
machine.
4. Key concepts
● Inventory
– List of managed computers, can be grouped.
– Default in /etc/ansible/hosts.
– May be dynamically generated.
● Module
– Basic work units.
– Plenty of them (hundreds) available.
– Template, copy, user, ...
– http://docs.ansible.com/ansible/list_of_all_modules.html
5. Key concepts (2)
● Variables
– Defined on multiple levels (host, group, inventory).
– Used for conditionals and in templates.
● Facts
– Special variables taken from server (hostname,
date and time, networking setup, …).
– ansible -m setup localhost
6. Key concepts (3)
● Task
– One task do one thing (usually it is module invocation).
● Play
– Set of tasks that run on group of computers.
● Playbook
– Bunch of plays in one file.
● Role
– Encapsulate set of tasks, variables, templates, files together.
7. Toolset
● ansible
– Can run ad-hoc commands.
● ansible-playbook
– Run a playbooks (what a coincidence!).
● ansible-galaxy
– Download roles from other ansible users.
● ansible-vault
– Can encrypt variables, protect passwords, etc.
8. Workshop!
● Install full HA load balanced LAMP stack with
replicated mysql.
● Time: 4 hours
● Probability I will be dragged away by force:
High
● It was tempting to see how long I`ll be able to
speak :).
9. Workshop!
● Install ntp server
● Time: 30 minutes
● Probability I will be dragged away by force: Low
● Maybe boring, but hey, we have to start
somewhere!
10. Install ntp (in playbook)
● Get playbook: git clone
https://github.com/davidkarban/devconfcz2016_
ntp_playbook.git