On Fri, Mar 29, 2019, at 5:26 PM, Kai Stian Olstad wrote: > On 29.03.2019 22:08, [email protected] wrote: > > constants.py:122 > > > > INVALID_VARIABLE_NAMES = re.compile(r'^[\d\W]|[^\w]') > > It is document here > https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#creating-valid-variable-names > > > > Really makes it hard to do real-time.com (company domain name) > > Dash is subtraction in Jinja, so that is why you can't use that. > Period is used to access attributes in Jinja so foo.bar is the same as > foo['bar'] > > > > What is the recommendation or best practices for moving forward? > > > > > > [real_time_com]? > > What works for you is probably the best. > I use underscore since that makes is more readable that concatenate it > or camel case. >
Personally I think it's a stupid limitation. I kind of hope it blows up and they revert the change. Apparently users were getting confused why they couldn't use "groups.group-name" instead of "groups['group-name']", so they banned groups with those types of characters so you can always do groups.group_name. Just don't call your group "get", "copy", "keys", "items", or a host of other special values... Using "---" as an inventory_hostname is fine, though. V/r, James Cassell -- 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/1553896738.1670158.1668803592.5A5D1236%40webmail.messagingengine.com. For more options, visit https://groups.google.com/d/optout.
