[ansible-project] Issues with {{ ansible_hostname }} in task name within a role

2022-05-24 Thread Fco. Javier Lopez
Hello guys ! I do not get the hostname using this fact in task name within a role. Not sure if there is a known issue around this or that I'm doing something wrong. This is my code: main yml file contains this: # facts are collected by default but we want to make sure nobody removes them

[ansible-project] Re: Error handling using block/rescue

2022-04-18 Thread Fco. Javier Lopez
gt;>>> "cmd": ["/bin/false"], "delta": "0:00:00.001826", "end": "2022-04-18 >>>> 04:43:40.809305", "msg": "non-zero return code", "rc": 1, "start": >>>> "2022-0

[ansible-project] Re: Error handling using block/rescue

2022-04-18 Thread Fco. Javier Lopez
f recovery! >:-)] >> ************* >> fatal: [xxx]: FAILED! => {"ansible_facts": >> {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, >> "cmd

[ansible-project] Re: Error handling using block/rescue

2022-04-18 Thread Fco. Javier Lopez
ot;This always executes" } ok: [xxx] => { "msg": "This always executes" } ok: [xxx] => { "msg": "This always executes" } PLAY RECAP *************

[ansible-project] Error handling using block/rescue

2022-04-08 Thread Fco. Javier Lopez
Hello guys ! I have the following role created: - name: Recover block: - name: Starts the first node of the cluster in bootstrap mode shell: /etc/init.d/mysql bootstrap-pxc when: inventory_hostname == groups.CD5525[0] become: yes register: return_out - name: Sta