I am trying to use tests to match a hostname, I want hostnames that end in
the letter "d", they are non-production hosts, here is what I have:
- name: Register to Foreman Redhat non-Prod
redhat_subscription:
state: present
activationkey: "Non-Prod-Redhat-7"
org_id: "Default_Organization"
when: inventory_hostname_short | match("*d")
and I am getting this error:
TASK [Register to Foreman Redhat non-Prod]
***********************************************************************************************************************************************
fatal: [slpatch001d]: FAILED! => {"failed": true, "msg": "The conditional
check 'inventory_hostname_short | match(\"*d\")' failed. The error was:
nothing to repeat\n\nThe error appears to have been in
'/Users/millerlu/misc/foreman.yml': line 10, column 7, but may\nbe
elsewhere in the file depending on the exact syntax problem.\n\nThe
offending line appears to be:\n\n\n - name: Register to Foreman Redhat
non-Prod\n ^ here\n"}
What am I doing wrong here?
Thanks,
Luke
--
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/b1b87d02-ac11-4fca-95ce-9cbd2ee59729%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.