preparing to schedule ansible-pull.sh
This commit is contained in:
+25
-26
@@ -1,22 +1,4 @@
|
||||
---
|
||||
|
||||
####
|
||||
#### WARNING:
|
||||
####
|
||||
#### bootstrap.sh and bootstrap.yml should be updated together. They should do the
|
||||
#### exact same things with the following exceptions:
|
||||
####
|
||||
#### * bootstrap.sh
|
||||
#### - at the end it should run ansible-pull.sh against bootstrap.yml
|
||||
####
|
||||
#### * bootstrap.yml
|
||||
#### - at the end it should configure cron to schedule ansible-pull.sh
|
||||
####
|
||||
#### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
#### ! Make sure to keep them in sync !
|
||||
#### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
####
|
||||
|
||||
- name: Bootstrap playbook
|
||||
hosts: all
|
||||
|
||||
@@ -41,6 +23,7 @@
|
||||
- python3-pip
|
||||
- python3-venv
|
||||
- python3-virtualenv
|
||||
- logrotate
|
||||
|
||||
|
||||
#### Configure sudo
|
||||
@@ -276,7 +259,7 @@
|
||||
key: "{{ lookup('file', 'files/ssh-keys/heath.pub') }}"
|
||||
|
||||
|
||||
#### Schedule ansible-pull.sh
|
||||
#### ansible-pull.sh
|
||||
|
||||
- name: Make sure log directory exists
|
||||
become: true
|
||||
@@ -287,13 +270,29 @@
|
||||
group: root
|
||||
mode: u=rwx,go=
|
||||
|
||||
# - name: Create ansible-pull.sh crontab entry
|
||||
# become: true
|
||||
# ansible.builtin.cron:
|
||||
# name: "ansible-pull"
|
||||
# minute: "*/27"
|
||||
# job: $HOME/bin/ansible-pull.sh
|
||||
# backup: true
|
||||
# - name: Create ansible-pull.sh crontab entry
|
||||
# become: true
|
||||
# become_user: hpf-ans
|
||||
# ansible.builtin.cron:
|
||||
# name: "ansible-pull"
|
||||
# minute: "*/27"
|
||||
# job: $HOME/bin/ansible-pull.sh
|
||||
# backup: true
|
||||
|
||||
- name: Rotate ansible-pull.sh.log
|
||||
become: true
|
||||
community.general.logrotate:
|
||||
name: ansible-pull.sh
|
||||
paths:
|
||||
- /var/log/ansible-pull.sh/*.log
|
||||
rotation_period: daily
|
||||
rotate_count: 32
|
||||
compress: true
|
||||
compress_options: "-9"
|
||||
delay_compress: true
|
||||
missing_ok: true
|
||||
not_if_empty: true
|
||||
backup: true
|
||||
|
||||
|
||||
#### Clean System Software
|
||||
|
||||
Reference in New Issue
Block a user