geerlingguy / geerlingguy/ansible-for-devops
Invalid inventory group names (containing dashes/hyphens) in Chapter 8?
- Dominant language
- Python
- Stars
- 9.9k
- Forks
- 3.8k
- PR merge metrics
- No merged PRs in 30d
Description
Thanks for the book! I'm pretty new to Ansible, but I don't think this is a totally dumb question.
The group names in the example inventory on page 164 of the 2.0 release include dashes. I followed that pattern in an inventory of my own, and got complaints from Ansible 2.9.11:
```
[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow bad characters in group names by default, this will change, but still be user configurable on deprecation. This feature will be removed in version 2.10. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details
```
Changing the dashes to underscores made the warnings disappear. [The docs on (I think) this](https://docs.ansible.com/ansible/2.9/user_guide/playbooks_variables.html#valid-variable-names) certainly make it sound like dashes aren't valid. Am I missing something, or is this an error in the text?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the source for Chapter 8 and the inventory example on page 164 of the 2.0 release. Compare its group names with Ansible 2.9's invalid-character warnings and update the example or accompanying text so the documented names are valid and the warning is addressed.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100