Kapisi/roles/WolfPack/tasks/main.yml

47 lines
894 B
YAML
Raw Permalink Normal View History

---
- name: Packages
become: yes
package:
2024-01-12 13:06:19 -06:00
state: present
name:
2024-01-12 13:06:19 -06:00
- WolfPack
2024-01-12 13:06:19 -06:00
- name: File config
become: yes
2024-01-12 13:06:19 -06:00
when: "wolfpack_config is not defined"
ansible.posix.synchronize:
src: "{{ inventory_hostname }}/"
dest: /usr/local/etc/WolfPack
2024-01-12 13:06:19 -06:00
delete: true
- name: Git config
become: yes
when: "wolfpack_config is defined"
git:
repo: "{{ wolfpack_config }}"
dest: /usr/local/etc/WolfPack
clone: yes
update: no
- name: Hardening
become: yes
loop:
- /usr/local/etc/WolfPack
- /srv/wolfpack
file:
path: "{{ item }}"
state: directory
owner: wolfpack
group: wolfpack
mode: 0755
recurse: true
- name: Timer
become: yes
systemd:
name: "{{ wolfpack_service | default('wolfpack.timer') }}"
state: started
enabled: yes
daemon_reload: yes