EvoBSD/roles/post-install/tasks/motd.yml
Jérémy Dubois 381aa50e37
Some checks failed
continuous-integration/drone/push Build is failing
Deletion of simple quotes preventing the task to be correctly executed
2020-10-26 16:40:53 +01:00

26 lines
710 B
YAML

---
- name: Deploy dynamic motd script for CARP master or backup
copy:
src: motd-carp-state.sh
dest: /usr/share/scripts/motd-carp-state.sh
owner: root
group: wheel
mode: '0755'
- name: Fetch root crontab content
command: >
grep "/bin/sh /usr/share/scripts/motd-carp-state.sh" /var/cron/tabs/root
check_mode: false
register: root_crontab_content
failed_when: false
changed_when: false
- name: Cron job for dynamic motd script is installed
cron:
name: dynamic motd for CARP
job: "/bin/sh /usr/share/scripts/motd-carp-state.sh"
disabled: true
when:
- not (root_crontab_content.stdout
| regex_search('/bin/sh /usr/share/scripts/motd-carp-state.sh'))