Hello @all
today i took another try on the role dependency feature and realize that
this doesn't work as i expect this.
First at all:
ansible --version
ansible 1.9.2
configured module search path = /usr/share/ansible
I try to explain what i mean with an sample playbook/roles:
$ cat play-test.yml
---
- name: dependency test
gather_facts: false
hosts: localhost
roles:
- { role: feature1 }
- { role: feature2 }
$ cat roles/feature1/tasks/main.yml
- name: in feature1
debug: msg="here we are in feature1"
$ cat roles/feature1/meta/main.yml
---
allow_duplicates: yes
dependencies:
- { role: base }
$ cat roles/feature2/tasks/main.yml
- name: in feature2
debug: msg="here we are in feature2"
$ cat roles/feature2/meta/main.yml
---
allow_duplicates: yes
dependencies:
- { role: base }
I would expect because of the allow_duplicates: yes that the basic role is
executed twice but that doesn't happen:
$ ansible-playbook play-test.yml
PLAY [dependency test]
********************************************************
TASK: [base | in base]
********************************************************
ok: [localhost] => {
"msg": "here we are in base"
}
TASK: [feature1 | in feature1]
************************************************
ok: [localhost] => {
"msg": "here we are in feature1"
}
TASK: [feature2 | in feature2]
************************************************
ok: [localhost] => {
"msg": "here we are in feature2"
}
PLAY RECAP
********************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=0
Is this the right behavior?
--
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/3af29ef8-f635-4a1a-b0c6-3f88abd3b05e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.