automation engine. • Simple: Ansible uses a clear (readable) YAML sintax. • Fast: easy to learn, easy to setup. • Efficient: No agent on you servers. • Secure: No open ports on your firewalls (SSH). @sebamontini
units of work that Ansible ships out to remote hosts. Facts: Things that are discovered about remote nodes. Playbooks: List of plays (mapping of hosts and tasks). Tasks: set of actions (module+args) to be executed. @sebamontini
tasks/ # install.yml configs.yml code.yml main.yml # <-- tasks file can include smaller files if warranted handlers/ # main.yml # <-- handlers file templates/ # <-- files for use with the template resource ntp.conf.j2 # <------- templates end in .j2 vars/ # main.yml # <-- variables associated with this role defaults/ # main.yml # <-- default lower priority variables for this role meta/ # main.yml # <-- role dependencies
will be executed without being proceeded through a shell. As a consequence some variables like $HOME are not available. And also stream operations like <, >, | and & will not work. • The Shell module runs a command through a shell, by default /bin/sh. This can be changed with the option executable. Piping and redirection are here therefor available. • The command module is more secure, because it will not be affected by the user’s environment. @sebamontini
tag group_vars) • facts • Plays vars • role vars • included vars • task vars (only for the task) • extra vars (-e in the command line) always win @sebamontini