69 lines
1.7 KiB
YAML
69 lines
1.7 KiB
YAML
---
|
||
# The home-server project produces a multi-purpose setup using Ansible.
|
||
# Copyright © 2018–2023 Y. Gablin, under the GPL-3.0-or-later license.
|
||
# Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing.
|
||
|
||
### UPSTREAM BEGIN ⇒ ###
|
||
- name: pull prerequisites from upstream
|
||
include_role: name=etckeeper.inc allow_duplicates=true tasks_from=upstream.yml
|
||
vars:
|
||
msg: Pyruse
|
||
### ⇐ UPSTREAM BEGIN ###
|
||
|
||
- name: install software
|
||
package:
|
||
name: python-systemd
|
||
|
||
- name: install AUR software
|
||
include_role:
|
||
name: aur.inc
|
||
allow_duplicates: true
|
||
vars:
|
||
packages:
|
||
- pyruse
|
||
|
||
### UPSTREAM END ⇒ ###
|
||
- name: merge upstream
|
||
include_role: name=etckeeper.inc allow_duplicates=true tasks_from=merge.yml
|
||
vars:
|
||
msg: Pyruse
|
||
### ⇐ UPSTREAM END ###
|
||
|
||
- name: send the configuration file
|
||
template:
|
||
src: templates/pyruse.json.j2
|
||
dest: /etc/pyruse/pyruse.json
|
||
mode: 0600
|
||
notify:
|
||
- restart pyruse.service
|
||
|
||
- name: action_nftBan depends on the DMZ
|
||
copy:
|
||
content: |
|
||
[Unit]
|
||
Requires=systemd-nspawn@{{DMZ}}.service
|
||
After=systemd-nspawn@{{DMZ}}.service
|
||
dest: /etc/systemd/system/pyruse-boot@action_nftBan.service.d/nftBan_wants_{{DMZ}}.conf
|
||
when: (env == 'prod')
|
||
notify:
|
||
- restart pyruse-boot@action_nftBan.service
|
||
|
||
- name: enable pyruse-boot@action_nftBan.service
|
||
systemd:
|
||
daemon_reload: true
|
||
name: pyruse-boot@action_nftBan.service
|
||
enabled: true
|
||
|
||
- name: enable pyruse.service
|
||
systemd:
|
||
daemon_reload: true
|
||
name: pyruse.service
|
||
enabled: true
|
||
|
||
### LOCAL COMMIT ⇒ ###
|
||
- name: commit local changes
|
||
include_role: name=etckeeper.inc allow_duplicates=true tasks_from=local.yml
|
||
vars:
|
||
msg: Pyruse
|
||
### ⇐ LOCAL COMMIT ###
|