diff --git a/roles/comanage-registry-plugins/tasks/configure.yml b/roles/comanage-registry-plugins/tasks/configure.yml index 97d66202..c4ea5c60 100644 --- a/roles/comanage-registry-plugins/tasks/configure.yml +++ b/roles/comanage-registry-plugins/tasks/configure.yml @@ -1,5 +1,17 @@ --- +- name: Add ENV vars in cron.d file + cron: + name: "{{ item.name }}" + job: "{{ item.job }}" + user: "{{ item.user }}" + env: yes + cron_file: "{{ item.filename }}" + state: present + loop: "{{ comanage_plugins_cron_env | default([]) }}" + become: true + when: comanage_plugins_cron_env is defined and comanage_plugins_cron_jobs is defined and comanage_plugins_cron_jobs_enabled + - name: Ensure COmanage Registry Plugins cron jobs are installed cron: name: "{{ item.name }}" @@ -24,6 +36,6 @@ state: link owner: root group: root - loop: "{{ comanage_symlinks | default([]) }}" + loop: "{{ comanage_plugins_symlinks | default([]) }}" become: true - when: comanage_symlinks is defined \ No newline at end of file + when: comanage_plugins_symlinks is defined \ No newline at end of file diff --git a/roles/comanage-registry-plugins/tasks/main.yml b/roles/comanage-registry-plugins/tasks/main.yml index 6b955281..3c5b5b5a 100644 --- a/roles/comanage-registry-plugins/tasks/main.yml +++ b/roles/comanage-registry-plugins/tasks/main.yml @@ -23,10 +23,10 @@ file: install.yml apply: tags: - - install + - comanage-registry-plugins:install loop: "{{ comanage_registry_plugins|flatten(levels=1) }}" tags: - - install + - comanage-registry-plugins:install # Include configuration tasks - name: Include Configure tasks @@ -34,6 +34,6 @@ file: configure.yml apply: tags: - - configure + - comanage-registry-plugins:configure tags: - - configure + - comanage-registry-plugins:configure diff --git a/roles/comanage-registry/tasks/configure.yml b/roles/comanage-registry/tasks/configure.yml index e6b3bc68..c7480c2e 100644 --- a/roles/comanage-registry/tasks/configure.yml +++ b/roles/comanage-registry/tasks/configure.yml @@ -112,6 +112,18 @@ tags: - comanage-registry:config:core +- name: Add ENV vars in cron.d file + cron: + name: "{{ item.name }}" + job: "{{ item.job }}" + user: "{{ item.user }}" + env: yes + cron_file: "{{ item.filename }}" + state: present + loop: "{{ comanage_cron_env | default([]) }}" + become: true + when: comanage_cron_env is defined and comanage_cron_jobs is defined and comanage_cron_jobs_enabled + - name: Ensure COmanage Registry cron jobs are installed cron: name: "{{ item.name }}"