Simple loop To create loops the attribute with_items is used to define that the action/task will be performed for all items…
[Ansible] – How to include tasks and variables file definitions?
It is possible to create files with tasks and variables definitions to reuse in many playbooks. To use them in…
[Ansible] – Understanding Ansible facts
What are Ansible Facts? Ansible facts are variables that automatically are obtained for example the hostname, the network interfaces, the version of the operating…
[Ansible] – How to use variables?
Syntax variable names Spaces, and dots and special characters as for example ($) are not valid syntaxes for the variable names. …
[Ansible] – How to define a list of values in the YAML files?
The list can be informed like the following example. hosts: – servera.example.com – serverb.example.com – serverc.example.com Also, it can be…
[Ansible] – How to create and use variable dictionaries in the YAML files?
The key-value pairs can be passed indented in the file like the following example. name: valuename key: value secondkey: 2…
[Ansible] – How to get the module documentation by command line? How to get a help to use the modules?
Use the following command to check all modules $ ansible-doc -l ` Use the following command to check the documentation…
[Ansible] – Understanding string syntax
A string can be defined without and with quotes as the following examples here all is a string ‘my string…
[Ansible] – Understanding playbooks
Ansible playbooks are YAML files which are implemented to run ansible tasks. Following a basic ansible playbook file structure. — # Here…
[Docker] – Creating a Docker container with Fedora and a Docker installed inside
Following the steps. 1. Create a Dockerfile with the following content. from fedora RUN dnf install python-pip -y RUN dnf…