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
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
f recovery! >:-)]
>> *************
>> fatal: [xxx]: FAILED! => {"ansible_facts":
>> {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true,
>> "cmd
ot;This always executes"
}
ok: [xxx] => {
"msg": "This always executes"
}
ok: [xxx] => {
"msg": "This always executes"
}
PLAY RECAP
*************
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