Update to 2022-08-19 16:00

This commit is contained in:
Daniel Berteaud
2022-08-19 16:00:17 +02:00
parent 6ebee1169f
commit f17ab3267b
50 changed files with 516 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
---
- name: Deploy DRBD Reactor configuration
template: src=drbd-reactor.toml.j2 dest=/etc/drbd-reactor.toml
notify: restart drbd-reactor
tags: drbd

View File

@@ -0,0 +1,11 @@
---
# Load distribution specific variables
- include_vars: "{{ item }}"
with_first_found:
- "{{ role_path }}/vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
- "{{ role_path }}/vars/{{ ansible_distribution }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family }}.yml"
tags: drbd

View File

@@ -0,0 +1,18 @@
---
- name: Install packages
package: name={{ drbd_reactor_packages }}
tags: drbd
- name: Install drbd-reactor-reload units
template: src=drbd-reactor-reload.{{ item }}.j2 dest=/etc/systemd/system/drbd-reactor-reload.{{ item }}
loop:
- path
- service
register: drbd_reactor_reload_unit
tags: drbd
- name: Reload systemd
systemd: daemon_realod=True
when: drbd_reactor_reload_unit.changed
tags: drbd

View File

@@ -0,0 +1,8 @@
---
- name: Handle prometheus port ports
iptables_raw:
name: drbd_reactor_prom_port
state: "{{ (drbd_reactor_prom_src_ip | length > 0) | ternary('present','absent') }}"
rules: "-A INPUT -m state --state NEW -p tcp --dport {{ drbd_reactor_prom_port }} -s {{ drbd_reactor_prom_src_ip | join(',') }} -j ACCEPT"
tags: firewall,drbd

View File

@@ -0,0 +1,17 @@
---
- include_tasks: facts.yml
tags: always
- include_tasks: install.yml
tags: always
- include_tasks: conf.yml
tags: always
- include_tasks: iptables.yml
when: iptables_manage | default(True)
tags: always
- include_tasks: services.yml
tags: always

View File

@@ -0,0 +1,10 @@
---
- name: Start and enable the service
service: name=drbd-reactor state=started enabled=True
register: drbd_reactor_started
tags: drbd
- name: Start drbd-reactor-reload
systemd: name=drbd-reactor-reload.path state=started enabled=True
tags: drbd