- Slides
-
Labs
- 1.0 - Setting up Ansible
- 2.0 - Documentation
- 3.0 - Setup and AdHoc Commands
- 4.0 - Ansible Playbooks - Basics
- 4.1 - Ansible Playbooks - Variables and Loops
- 4.2 - Ansible Playbooks - Templates
- 4.3 - Ansible Playbooks - Output
- 5.0 - Ansible Roles - Basics
- 5.1 - Ansible Roles - Handlers and Blocks
- 6.0 - Managing Secrets with Ansible Vault
- 7.0 - Ansible Galaxy and more
- About
- Setup
2.0 - Documentation
Task 1
- Print out a list of all Ansible modules in your terminal
Don’t be rattled about the massive amount of modules you’ll see in your terminal.
- Print out information about the Ansible module
file
in your terminal
Task 2
- Find the official online documentation of Ansible in your browser
- Visit the module index (e.g. list of all modules) in the online documentation
- Use the search field in the upper left of the webpage and also use the search field in the lower right
Task 3 (Advanced)
- By installing the
ansible-doc
package, not only the command itself gets installed but also a lot of additional documentation. Use your package-managers functionality to find out what files are installed withyum install ansible-doc
. - Now find documentation about jinja2 on the controller.
Solutions
$ ansible-doc -l
$ ansible-doc file
$ ansible-doc -s file
Ansible Doc options explained:-l
is synoymous with --list
and list all available modules.-s
is synoymous with --snippet
and displays for the file
module.`
- visit Ansible Docs
- visit Ansible Docs - Modules by category
One way to find a list of provided documentation:
$ yum install -y yum-utils # (if needed)
$ repoquery ansible-doc -l
Note: Above only applies for ansible version 2.8 and earlier. In 2.9
there is only one package called ansible
You can also search for files in /usr/share/doc
:
$ ls -lahr /usr/share/doc/ | grep jinja2
Note: Above only applies for ansible version 2.8 and earlier. In 2.9
there is only one package called ansible