47 lines
894 B
YAML
47 lines
894 B
YAML
---
|
|
|
|
- name: Packages
|
|
become: yes
|
|
package:
|
|
state: present
|
|
name:
|
|
- WolfPack
|
|
|
|
- name: File config
|
|
become: yes
|
|
when: "wolfpack_config is not defined"
|
|
ansible.posix.synchronize:
|
|
src: "{{ inventory_hostname }}/"
|
|
dest: /usr/local/etc/WolfPack
|
|
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
|