More tweaking on that front

This commit is contained in:
Salt 2020-06-17 09:03:47 -05:00
parent 27e6cadb9a
commit 79102c5d0c
4 changed files with 13 additions and 2 deletions

View 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

View File

@ -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

View File

@ -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

View File

@ -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