mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-23 20:39:26 +00:00
Merge branch 'main' of https://gitlab.sectorq.eu/jaydee/ansible
This commit is contained in:
commit
2d7482644b
@ -64,7 +64,7 @@ datacenter:
|
||||
vars:
|
||||
ansible_python_interpreter: /opt/bin/python
|
||||
ansible_user: admin
|
||||
ansible_pass: l4c1j4yd33Du5lo
|
||||
ansible_pass: l4c1!j4yd33?Du5lo
|
||||
raspberry:
|
||||
hosts:
|
||||
192.168.77.246
|
||||
@ -88,5 +88,5 @@ datacenter:
|
||||
192.168.77.106:
|
||||
vars:
|
||||
ansible_user: admin
|
||||
ansible_pass: l4c1j4yd33Du5lo
|
||||
ansible_pass: l4c1!j4yd33?Du5lo
|
||||
ansible_python_interpreter: /share/ZFS530_DATA/.qpkg/QPython39/bin/python3
|
@ -68,6 +68,11 @@
|
||||
- name: Restart firewall
|
||||
command: service restart_firewall
|
||||
when: inventory_hostname in groups['router']
|
||||
- name: Stop containers
|
||||
command: "docker stop {{ containers | join(' ') }}"
|
||||
become: true
|
||||
ignore_errors: true
|
||||
when: inventory_hostname in groups['nas']
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: Start mailu containers
|
||||
command: "docker start nginx-app-1 heimdall mailu2-admin-1 mailu2-antispam-1 mailu2-antivirus-1 mailu2-fetchmail-1 mailu2-front-1 mailu2-imap-1 mailu2-oletools-1 mailu2-redis-1 mailu2-resolver-1 mailu2-smtp-1 mailu2-webdav-1 mailu2-webmail-1 HomeAssistant mosquitto-mosquitto-1"
|
||||
command: "docker start gitlab semaphore-db-1 semaphore-app-1 nginx-app-1 heimdall mailu2-admin-1 mailu2-antispam-1 mailu2-antivirus-1 mailu2-fetchmail-1 mailu2-front-1 mailu2-imap-1 mailu2-oletools-1 mailu2-redis-1 mailu2-resolver-1 mailu2-smtp-1 mailu2-webdav-1 mailu2-webmail-1 HomeAssistant mosquitto-mosquitto-1 webhub-web-1"
|
||||
become: true
|
||||
ignore_errors: true
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: Stop mailu containers
|
||||
command: "docker stop nginx-app-1 heimdall mailu2-admin-1 mailu2-antispam-1 mailu2-antivirus-1 mailu2-fetchmail-1 mailu2-front-1 mailu2-imap-1 mailu2-oletools-1 mailu2-redis-1 mailu2-resolver-1 mailu2-smtp-1 mailu2-webdav-1 mailu2-webmail-1 HomeAssistant mosquitto-mosquitto-1"
|
||||
command: "docker stop gitlab semaphore-db-1 semaphore-app-1 nginx-app-1 heimdall mailu2-admin-1 mailu2-antispam-1 mailu2-antivirus-1 mailu2-fetchmail-1 mailu2-front-1 mailu2-imap-1 mailu2-oletools-1 mailu2-redis-1 mailu2-resolver-1 mailu2-smtp-1 mailu2-webdav-1 mailu2-webmail-1 HomeAssistant mosquitto-mosquitto-1 webhub-web-1"
|
||||
become: true
|
||||
ignore_errors: true
|
@ -22,6 +22,25 @@
|
||||
- pw.sectorq.eu
|
||||
- semaphore.sectorq.eu
|
||||
when: inventory_hostname in groups['raspberrypi5']
|
||||
- name: Get relevant configs
|
||||
ansible.builtin.shell: 'egrep -l "# ha.sectorq.eu|# pw.sectorq.eu|# semaphore.sectorq.eu|# sectorq.eu|# gitlab.sectorq.eu|# ha.sectorq.eu" /share/docker_data/nginx/data/nginx/proxy_host/*'
|
||||
ignore_errors: yes
|
||||
become: yes
|
||||
register: result
|
||||
when: inventory_hostname in groups['raspberrypi5']
|
||||
|
||||
- debug:
|
||||
msg: "{{ result.stdout_lines }}"
|
||||
when: inventory_hostname in groups['raspberrypi5']
|
||||
- name: Replace ip
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ item }}"
|
||||
regexp: '^\s+set \$server\s+\"\w+.\w+.\w+.\w+\";'
|
||||
line: " set $server \"192.168.77.238\";"
|
||||
become: yes
|
||||
with_items:
|
||||
- "{{ result.stdout_lines }}"
|
||||
when: inventory_hostname in groups['raspberrypi5']
|
||||
|
||||
- include_tasks: reconfigure_heimdall.yaml
|
||||
name: Reconfigure heimdall
|
||||
|
Loading…
x
Reference in New Issue
Block a user