Following an example over how to install ansible with python3 in a centos/rhel7 docker image. FROM registry.access.redhat.com/ubi7/ubi … RUN mkdir … More
Category: ansible
[Ansible] – How to upgrade for python3?
Following the installation steps. $ pip3 install –upgrade setuptools pip $ pip install –user ansible After the python3 be already … More
[Ansible] – How to debug and troubleshooting?
Log Files The path for the logs is configured by the param log_path ansible.cfg in the file. Also, it could be done … More
[Ansible] – How to run task by task?
Use the param –step. Following an example $ ansible-playbook myplabook.yml –step
[Ansible] – How to work with encrypted data?
The ansible-vault command will be used to work with encryption and decryption of files. Following an example. $ansible-vault create myencryptedfile.yml … More
[Ansible] – How to run tasks in parallel?
By default, Ansible runs the same task in 5 hosts in parallel. This configuration can be changed by using “forks” parameter … More
[Ansible] – How to define that some task into the playbook should be executed locally or in another host?
In order to configure that the task should be executed in another host use the attribute delegate_to and to define that … More
[Ansible] – Understanding roles
Roles are a good way to organize ansible playbooks. Roles allow group the tasks, handlers, files, templates and variable definitions. Following … More
[Ansible] – Using the module template and jinja files to update hosts
The module template is helpful to create contents in the hosts. Jinja allows work by creating dynamically contents as the … More
[Ansible] – How to create a code implementation similar to try catch statements?
To attend this need Ansible provides the attribute block as follows. tasks: – block: # Add here the tasks/actions rescue: … More