Hi all,

I am having a problem with host classification. In my hosts file i have a 
“nodejs:children” group with application “foo”. “foo” has server-a. In 
site.yml I use hosts: nodejs:&{{ application }} and assign a role. This 
works well with multiple applications until the same server is configured 
in multiple groups. Then multiple roles are applied. I would expect only 1 
role applied. Any idea what is going wrong? Here is the relevant files:

hosts:
```
[nodejs:children]
foo
[java:children]
bar
[foo]
localhost
[bar]
localhost
```

site.yml:

```

---

- name: deploy nodejs app

  hosts: nodejs:&{{ application }}

  roles:

    - nodejs


- name: deploy java app

  hosts: java:&{{ application }}

  roles:

    - java
```

command:
```
ansible-playbook site.yml -i hosts --check -e 'application=foo'

```

Thanks,
Jan

-- 
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/badbb2f2-f71d-442c-9d4a-254dcf83dea6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to