I have a role which is just a meta playbook for installing many packages.
I only want these to run once during an ansible run since interacting with the package manager is slow.
I thought I'd register a variable and check it, however I'm getting an error.
TASK: [feature/zypper | remove non-seas repos] ********************************
fatal: [
tr808.seas.upenn.edu] => error while evaluating conditional: ( common_has_executed == 'false')
Here the relevant files:
common/tasks/main.yml
---
- name: log common status
set_fact: common_has_executed = 'true'
common/meta/main.yml
---
allow_duplicates: no
dependencies:
- { role: feature/rc.firewall, when: ( common_has_executed == 'false') }
- { role: feature/perl, when: ( common_has_executed == 'false') }
- { role: feature/python, when: ( common_has_executed == 'false') }
- { role: feature/ruby, when: ( common_has_executed is == 'false') }