Closed sebastianmacarescu closed 2 years ago
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
Yes that makes sense to me. I'm already using that approach for one of my roles.
This issue is no longer marked for closure.
It will be difficult to fix that though, because the tasks defining the variables are all over the place. Also the role uses include_tasks instead of import_tasks, so always tag wouldn't help for these tasks.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
I'm using this role in a task with tags as follows:
- name: Create .env file ansible.builtin.template: src: .env.j2 dest: "{{ install_path }}/.env" notify: restart webserver tags: ['configuration', 'configuration:app']
I'm running the playbook with
--tags "configuration:app"
I get the following error: `msg: |- The task includes an option with an undefined variable. The error was: 'php_fpm_daemon' is undefined
The solution is pretty simple. Add
always
tag for all tasks in this role that load variables. https://docs.ansible.com/ansible/latest/user_guide/playbooks_tags.html#special-tags-always-and-neverThat is:
I can provide a PR if needed