More tweaking on that front
This commit is contained in:
parent
27e6cadb9a
commit
79102c5d0c
10
roles/ansible-pull/handlers/main.yml
Normal file
10
roles/ansible-pull/handlers/main.yml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/ansible-playbook
|
||||||
|
# vim:ft=ansible:
|
||||||
|
---
|
||||||
|
- name: restart ansiblepull timer
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
name: ansible-pull.timer
|
||||||
|
enabled: yes
|
||||||
|
state: restarted
|
||||||
|
become: yes
|
@ -18,6 +18,7 @@
|
|||||||
loop:
|
loop:
|
||||||
- { src: "ansible-pull.service", dest: "/etc/systemd/system/ansible-pull.service", mode: "0644" }
|
- { src: "ansible-pull.service", dest: "/etc/systemd/system/ansible-pull.service", mode: "0644" }
|
||||||
- { src: "ansible-pull.timer", dest: "/etc/systemd/system/ansible-pull.timer", mode: "0644" }
|
- { src: "ansible-pull.timer", dest: "/etc/systemd/system/ansible-pull.timer", mode: "0644" }
|
||||||
|
notify: restart ansiblepull timer
|
||||||
- name: Enable timer
|
- name: Enable timer
|
||||||
systemd:
|
systemd:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
|
@ -5,8 +5,7 @@ Description=Ansible pull service
|
|||||||
[Service]
|
[Service]
|
||||||
User=ansible
|
User=ansible
|
||||||
Group=ansible
|
Group=ansible
|
||||||
# Forking and not oneshot here because we don't want it stuck in the Activating state forever
|
Type=oneshot
|
||||||
Type=forking
|
|
||||||
Environment=ANSIBLE_CONFIG=~/ansible-pull-repo/ansible-pull.cfg
|
Environment=ANSIBLE_CONFIG=~/ansible-pull-repo/ansible-pull.cfg
|
||||||
ExecStart=ansible-pull --tags pull --accept-host-key -U "https://git.9iron.club/salt/ansible" -d "~/ansible-pull-repo" --vault-password-file "~/ansiblevaultpass" site.yml
|
ExecStart=ansible-pull --tags pull --accept-host-key -U "https://git.9iron.club/salt/ansible" -d "~/ansible-pull-repo" --vault-password-file "~/ansiblevaultpass" site.yml
|
||||||
|
|
||||||
|
@ -6,5 +6,6 @@
|
|||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
name: gitea.service
|
name: gitea.service
|
||||||
state: restarted
|
state: restarted
|
||||||
|
become: yes
|
||||||
- name: gitea add default user
|
- name: gitea add default user
|
||||||
include_tasks: tasks/add_default_user.yml
|
include_tasks: tasks/add_default_user.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user