Add service units using r10k
This commit is contained in:
parent
b5942017e2
commit
f62e5d47c5
3 changed files with 25 additions and 5 deletions
|
@ -2,8 +2,8 @@
|
||||||
Description=Filter mail
|
Description=Filter mail
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnBootSec=5min
|
OnBootSec=10min
|
||||||
OnUnitActiveSec=5min
|
OnUnitActiveSec=10min
|
||||||
Unit=update_puppet_code.service
|
Unit=update_puppet_code.service
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -124,3 +124,24 @@
|
||||||
path: /etc/puppetlabs/code/environments/production
|
path: /etc/puppetlabs/code/environments/production
|
||||||
src: /etc/puppetlabs/code/environments/master
|
src: /etc/puppetlabs/code/environments/master
|
||||||
state: link
|
state: link
|
||||||
|
|
||||||
|
- name: Ensure service unit to update puppet code exists
|
||||||
|
template:
|
||||||
|
src: templates/update_puppet_code.service.j2
|
||||||
|
dest: /etc/systemd/system/update_puppet_code.service
|
||||||
|
mode: 0644
|
||||||
|
backup: yes
|
||||||
|
notify: Reload Systemd daemon
|
||||||
|
|
||||||
|
- name: Ensure timer unit to update puppet code exists
|
||||||
|
copy:
|
||||||
|
src: files/update_puppet_code.timer
|
||||||
|
dest: /etc/systemd/system/update_puppet_code.timer
|
||||||
|
mode: 0644
|
||||||
|
backup: yes
|
||||||
|
notify: Reload Systemd daemon
|
||||||
|
|
||||||
|
- name: Ensure service to update puppet code is enabled
|
||||||
|
service:
|
||||||
|
name: update_puppet_code
|
||||||
|
enabled: true
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
WorkingDirectory=/etc/puppetlabs/code/environments/production
|
ExecStart=r10k deploy environment -p --config /etc/puppetlabs/r10k/r10k.yaml
|
||||||
ExecStart=git pull
|
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
OnFailure=status_email_antoniodelgado@%n.service
|
OnFailure=status_email_antoniodelgado@%n.service
|
Loading…
Reference in a new issue