Verified Commit 7bdf1589 authored by Maciej Delmanowski's avatar Maciej Delmanowski

Merge branch 'drybjed-add-cron-fact'

parents e91b326f 6f417ec9
Pipeline #16983520 passed with stages
in 4 minutes and 3 seconds
......@@ -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
file:
path: '/etc/ansible/facts.d'
state: 'directory'
owner: 'root'
group: 'root'
mode: '0755'
- name: Save cron local facts
template:
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
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment