Browse Source

use handler

main
Markus Bergholz 2 months ago
parent
commit
e69fab5f7e
Signed by: m GPG Key ID: B45724801354B174
16 changed files with 32 additions and 65 deletions
  1. +2
    -2
      home.yml
  2. +1
    -1
      main.yml
  3. +5
    -0
      roles/containers/handlers/main.yml
  4. +2
    -6
      roles/containers/tasks/adguard.yml
  5. +2
    -6
      roles/containers/tasks/autoscaler.yml
  6. +2
    -6
      roles/containers/tasks/caddy.yml
  7. +2
    -6
      roles/containers/tasks/coturn.yml
  8. +2
    -6
      roles/containers/tasks/drone.yml
  9. +2
    -6
      roles/containers/tasks/gitea.yml
  10. +2
    -0
      roles/containers/tasks/maps.yml
  11. +2
    -6
      roles/containers/tasks/mariadb.yml
  12. +2
    -6
      roles/containers/tasks/nextcloud.yml
  13. +2
    -6
      roles/containers/tasks/onlyoffice.yml
  14. +2
    -6
      roles/containers/tasks/redis.yml
  15. +1
    -1
      roles/packages/tasks/workstation.yml
  16. +1
    -1
      roles/requirements/tasks/main.yml

+ 2
- 2
home.yml View File

@ -6,7 +6,7 @@
vars:
SALT: "{{ lookup('password', '/dev/null length=12 chars=ascii_letters') }}"
# vars for os-hardening
#######################
sysctl_overwrite:
@ -20,7 +20,7 @@
ssh_print_last_log: True
sshd_custom_options:
- "TrustedUserCAKeys /etc/ssh/id_ecdsa_sk.pub"
ssh_kex:
- curve25519-sha256@libssh.org
- diffie-hellman-group-exchange-sha256


+ 1
- 1
main.yml View File

@ -35,7 +35,7 @@
ssh_x11_forwarding: True
sshd_custom_options:
- "TrustedUserCAKeys /etc/ssh/id_ecdsa_sk.pub"
ssh_kex:
- curve25519-sha256@libssh.org
- diffie-hellman-group-exchange-sha256


+ 5
- 0
roles/containers/handlers/main.yml View File

@ -1,3 +1,8 @@
- name: reload systemd
systemd:
daemon_reload: yes
- name: restart service
systemd:
name: "{{ THIS_SERVICE }}"
state: restarted

+ 2
- 6
roles/containers/tasks/adguard.yml View File

@ -26,12 +26,8 @@
adguard/adguardhome:v0.104.3
mode: +x
register: myservice
- name: restart service
systemd:
name: "{{ THIS_SERVICE }}"
state: restarted
when: myservice.changed
notify:
- restart service
- name: started service
systemd:


+ 2
- 6
roles/containers/tasks/autoscaler.yml View File

@ -39,12 +39,8 @@
drone/autoscaler:1.7.3
mode: +x
register: myservice
- name: restart service
systemd:
name: "{{ THIS_SERVICE }}"
state: restarted
when: myservice.changed
notify:
- restart service
- name: started service
systemd:


+ 2
- 6
roles/containers/tasks/caddy.yml View File

@ -26,12 +26,8 @@
caddy:2.3.0-alpine
mode: +x
register: myservice
- name: restart service
systemd:
name: "{{ THIS_SERVICE }}"
state: restarted
when: myservice.changed
notify:
- restart service
- name: started service
systemd:


+ 2
- 6
roles/containers/tasks/coturn.yml View File

@ -27,12 +27,8 @@
coturn
mode: +x
register: myservice
- name: restart service
systemd:
name: "{{ THIS_SERVICE }}"
state: restarted
when: myservice.changed
notify:
- restart service
- name: started service
systemd:


+ 2
- 6
roles/containers/tasks/drone.yml View File

@ -29,12 +29,8 @@
drone/drone:1.9.1
mode: +x
register: myservice
- name: restart service
systemd:
name: "{{ THIS_SERVICE }}"
state: restarted
when: myservice.changed
notify:
- restart service
- name: started service
systemd:


+ 2
- 6
roles/containers/tasks/gitea.yml View File

@ -27,12 +27,8 @@
gitea/gitea:1.13.2
mode: +x
register: myservice
- name: restart service
systemd:
name: "{{ THIS_SERVICE }}"
state: restarted
when: myservice.changed
notify:
- restart service
- name: started service
systemd:


+ 2
- 0
roles/containers/tasks/maps.yml View File

@ -21,6 +21,8 @@
registry.gitlab.com/markuman/container-images:tileserver-gl
mode: +x
register: myservice
notify:
- restart service
- name: restart service
systemd:


+ 2
- 6
roles/containers/tasks/mariadb.yml View File

@ -26,12 +26,8 @@
registry.gitlab.com/markuman/mariadb:10.5.8
mode: +x
register: myservice
- name: restart service
systemd:
name: "{{ THIS_SERVICE }}"
state: restarted
when: myservice.changed
notify:
- restart service
- name: started service
systemd:


+ 2
- 6
roles/containers/tasks/nextcloud.yml View File

@ -28,12 +28,8 @@
name: "{{ THIS_SERVICE }}"
state: restarted
when: myservice.changed
- name: started service
systemd:
name: "{{ THIS_SERVICE }}"
state: started
when: not myservice.changed
notify:
- restart service
- name: prepair service
systemd:


+ 2
- 6
roles/containers/tasks/onlyoffice.yml View File

@ -23,12 +23,8 @@
onlyoffice/documentserver:6.1.0.83
mode: +x
register: myservice
- name: restart service
systemd:
name: "{{ THIS_SERVICE }}"
state: restarted
when: myservice.changed
notify:
- restart service
- name: started service
systemd:


+ 2
- 6
roles/containers/tasks/redis.yml View File

@ -22,12 +22,8 @@
redis:4-alpine
mode: +x
register: myservice
- name: restart service
systemd:
name: "{{ THIS_SERVICE }}"
state: restarted
when: myservice.changed
notify:
- restart service
- name: started service
systemd:


+ 1
- 1
roles/packages/tasks/workstation.yml View File

@ -48,4 +48,4 @@
- solo-python
extra_args: --user
executable: pip3
when: ansible_distribution == 'Archlinux'
when: ansible_distribution == 'Archlinux'

+ 1
- 1
roles/requirements/tasks/main.yml View File

@ -53,4 +53,4 @@
source ~/git/dotfiles/bash/env.bashrc
become_user: "{{ USER }}"
when: USER is defined

Loading…
Cancel
Save