Thanks for the info! I tried this in my own environment, since I actually
had a similar question before.
Moved playbooks to a playbooks dir. Set role_path=./roles. This broke my
include statements, which I now modified to '- include: "{{ roles_path }}
/role_handlers_ant/handlers/main.yml"'. This is likely a better practice
anyway.
However, it seems that my plays can no longer find my group_vars and other
such objects. Basic structure is below:
ansible.cfg
.ansible/inventory
playbooks/
pb.yml
roles/
# roles...
host_vars/
# host_vars...
group_vars/
# group_vars...
Should host and group vars also be moved? They worked fine before I moved
playbooks from top level dir to their own dir.
Specifically, the error I get now is below. This is a variable defined in a
group_vars.
> fatal: [ptl01a0fap006]: FAILED! => {"failed": true, "msg": "The
> conditional check ''{{ ansible_user_id }}' != '{{ wmadmin }}'' failed. The
> error was: error while evaluating conditional ('{{ ansible_user_id }}' !=
> '{{ wmadmin }}'): 'wmadmin' is undefined\n\nThe error appears to have
> been in '/manh/roles/role_utility_preplay_validation/tasks/main.yml': line
> 2, column 3, but may\nbe elsewhere in the file depending on the exact
> syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Ensure
> uid is appropriate for {{ inventory_hostname_short }}\n ^ here\nWe could
> be wrong, but this one looks like it might be an issue with\nmissing
> quotes. Always quote template expression brackets when they\nstart a
> value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be
> written as:\n\n with_items:\n - \"{{ foo }}\"\n"}
Thanks
--
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/b2661e80-6e45-4924-ae9e-15d6cdb447f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.