Le 2019-02-12 17:11,
ryad9...@gmail.com a écrit :
> Hi all,
>
> I have a problem, i think there is a bug in ansible 2.8.0 but when i
> run this task :
>
> - pause:
> prompt: "Voulez-vous effectuer ce deploiement ? (o/n)"
> register: response
>
> - debug:
> msg: "deploiement effectue"
> when: response == "o"
>
> - meta: end_play
> when: response != "o"
>
> The condition WHEN: RESPONSE != "0" not works !!
>
> So, when i grab "o" for answer at the question "VOULEZ-VOUS EFFECTUER
> CE DEPLOIEMENT ? (O/N)", this task is play or he must exit !!
>
> Why ?
>
> Thank for your help guy !! :)
>
Perhaps because you don't read the documentation and instead said
there's a bug ;-)
You asks a lot of questions in little time on the list, try a little bit
to learn by yourself
A little more functionning sample should probably be :
- hosts: localhost
tasks:
- name: "Prompt it"
pause:
prompt: "Voulez-vous effectuer ce deploiement ? (o/n)"
register: response
- name: "Print value of register"
debug:
msg: "print value of register : {{ response }}"
- name: "Affiche si o est presse"
debug:
msg: "deploiement effectue"
when: response.user_input == "o"
- name: "Aller a la fin si o n est pas presse"
meta: end_play
when: response.user_input != "o"
- name: "This is something after it"
debug:
msg: "Print it"
Regards,
JYL