mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-02-03 14:58:47 +00:00
lala
This commit is contained in:
parent
74def16ccd
commit
76aa74ff2f
8
playbooks/00_start_containers_rpi5.yml
Executable file
8
playbooks/00_start_containers_rpi5.yml
Executable file
@ -0,0 +1,8 @@
|
||||
- hosts: rpi5.home.lan
|
||||
name: Start containers rpi5
|
||||
become: true
|
||||
tasks:
|
||||
- name: Start containers
|
||||
ansible.builtin.shell: "docker start {{ item }}"
|
||||
register: containers
|
||||
with_items: ["HomeAssistant","webhub-web-1","heimdall","pihole","mosquitto-mosquitto-1","mailu3-redis-1","mailu3-webmail-1","mailu3-resolver-1","mailu3-antispam-1","mailu3-webdav-1","mailu3-smtp-1","mailu3-oletools-1","mailu3-front-1","mailu3-fetchmail-1","mailu3-imap-1","matter-server","piper-en","openwakeword","whisper-en","auth-worker-1","auth-server-1","auth-authentik_ldap-1","auth-redis-1","auth-postgresql-1","nginx-app-1"]
|
14
playbooks/00_stop_containers_rpi5.yml
Executable file
14
playbooks/00_stop_containers_rpi5.yml
Executable file
@ -0,0 +1,14 @@
|
||||
- hosts: rpi5.home.lan
|
||||
name: Stop rpi5
|
||||
become: true
|
||||
tasks:
|
||||
- name: Get running packages
|
||||
ansible.builtin.shell: "docker ps|awk '{print $NF}'"
|
||||
register: containers
|
||||
- debug:
|
||||
msg: "{{ containers.stdout_lines }}"
|
||||
- name: Stop containers
|
||||
ansible.builtin.shell: "docker stop {{ item }}"
|
||||
register: containers
|
||||
when: item != "NAMES" and item != "watchtower-watchtower-1"
|
||||
with_items: "{{ containers.stdout_lines }}"
|
Loading…
x
Reference in New Issue
Block a user