Sorry, it's set_fact, not set_vars. You'd add a task like this at the end:

- set_fact:
    checkdeps: '{{ checkdeps1 if not (checkdeps1 | skipped) else checkdeps2 }}'

Or put something like this after each of the tasks registering checkdeps*:

- set_fact:
    checkdeps: '{{ checkdeps1 }}'
  when: '{{ not (checkdeps1 | skipped) }}'

Adrian Paraschiv <[email protected]> napisał:
>Thanks for the fast response but I don't get it and google is not
>helping 
>me in finding an example or even how this module: "set_vars" works.
>So you say that if I put something like this:
>
>- name: "play deps if ACE_*"
>  shell: "cd /opt/play/apps/default-ace && play deps {{ dep }}"
>  register: *checkdeps1*
>  when: "dep == \"1\""
>- name: "play deps example to skip"
>  shell: "cd /opt/play/apps/default-ace && play deps {{ dep }}"
>  register: *checkdeps2*
>  when: "dep == \"2\""
>....
>- name: "play deps example to skip"
>  shell: "cd /opt/play/apps/default-ace && play deps {{ dep }}"
>  register: *checkdeps100*
>  when: "dep == \"100\""
>
>Where do I put set_vars ???
>
>-- 
>You received this message because you are subscribed to the Google
>Groups "Ansible Project" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to [email protected].
>To post to this group, send email to [email protected].
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/ansible-project/37ebb0ea-b7b0-46e4-aee1-d550449285a8%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
Wysłane za pomocą K-9 Mail.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d25d8bc3-8fc6-4d0d-9450-00564352a00a%40email.android.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to