2 ms·
That's a great point. I initially didn't have comments for any of those code sections. However, most of my reviewers encouraged me to add the comments so it wou
by mattjaynes 13y ago
That's a great point. I initially didn't have comments for any of those code sections. However, most of my reviewers encouraged me to add the comments so it would be clearer what each step was doing for beginners.
- bryanlarsen 13y agoIn that case, you can use YAML comments rather than ansible names. It makes it much more clear that it's optional, and you get the actual code in the log rather than the name/comment.
- mpdehaan2 13y agoAnsible actually encourages the use of the names because they show up as task headers. These are especially valuable when managing a large number of hosts.
- bryanlarsen 13y agoThat's exactly why I actively discourage the use of names. I'd much rather see "apt: pkg=foo" than "Ensure foo is installed" in my logs. Especially when I have a large number of hosts.