For example, there is an instance on which Python of the 2nd and 3rd versions is installed, but the default is 2nd, and in order not to change the default version and start the Playbook using Python3, you can use the following command: You can also specify the interpreter in the inventory file: …
Continue reading "Ansible – Launch Playbook with a specific version of Python"
When trying to get a value from AWS SSM, Ansible Playbook using Python3 as an interpreter generates the following error: fatal: [localhost-py3]: FAILED! => {"changed": false, "msg": "AnsibleError: An unhandled exception occurred while templating '{{ lookup('aws_ssm', 'server_listeners', decrypt=false, region=’eu-west-1′) }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while running the lookup …
Continue reading "FIX ERROR – Ansible AWS SSM: AnsibleError: An unhandled exception occurred while templating"
The following example was taken as a Playbook. This Playbook runs on the "docker" host group, installs the necessary packages for Docker, adds the Docker repository, installs Docker, launches it and adds it to autorun. Also adds the user "artem" to the group "docker" docker.yaml Apply Playbook: