[debops.cron] Add Ansible local facts

parent e91b326f
......@@ -75,3 +75,24 @@
- '{{ cron__combined_jobs }}'
- 'jobs'
when: cron__enabled|bool and item.0.state|d('present') not in [ 'absent', 'ignore' ]
- name: Make sure that Ansible local facts directory exists
path: '/etc/ansible/facts.d'
state: 'directory'
owner: 'root'
group: 'root'
mode: '0755'
- name: Save cron local facts
src: 'etc/ansible/facts.d/cron.fact.j2'
dest: '/etc/ansible/facts.d/cron.fact'
owner: 'root'
group: 'root'
mode: '0755'
register: cron__register_facts
- name: Update Ansible facts if they were modified
action: setup
when: cron__register_facts|changed
#!/usr/bin/env python
# {{ ansible_managed }}
from __future__ import print_function
from json import dumps
from sys import exit
output = {'installed': True, 'enabled': True}
print(dumps(output, sort_keys=True, indent=4))
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment