Should groups be "exclusive"?
davecb opened this issue · 6 comments
In a test, I got the message AddHost() failed: host p1s10.dcaux.indexww.com exists in multiple groups: zookeeper-nodes, dc1-stats, line: 1091
The machine was supposed to be in two groups, dc1-stats, with a specific task of providing zookeeper services, and our ansible seem to process it correctly.
Should the library be alerting on this?
Should the library be alerting on this?
@davecb, you probably right! 👍 could you please share your inventory file? I will add it as one of test cases.
Sure: I renamed the host machines a bit, so the error is now
AddHost() failed: host p1s10.dcauxbozotron.com exist in multiple groups: zookeeper-nodes, dc1-stats, line: 1091
AddHost() failed: host p1s10.dcauxbozotron.com exist in multiple groups: zookeeper-nodes, dc1-stats, line: 1091
@davecb , initially, when I designed it, I thought that a host would exist in a single group. The way someone would make it a part of two or more groups is by group nesting. Now, imagine you have the same host in multiple groups, but each instance of host has different key-values associated with it. Which environment variables the host would inherit? i.e. group 1, group 2, or both?
What are your thoughts?