style: make ansible-lint happier

This commit is contained in:
VC
2024-07-05 11:53:33 +02:00
parent 4f57cd79ee
commit fa6ed6484e
8 changed files with 38 additions and 33 deletions

View File

@@ -1,7 +1,7 @@
--- ---
- name: restart garage - name: Restart garage
systemd: ansible.builtin.systemd:
name: garage name: garage
enabled: true enabled: true
daemon_reload: true daemon_reload: true

View File

@@ -1,7 +1,7 @@
--- ---
- name: install garage - name: Install garage
get_url: ansible.builtin.get_url:
url: "{{ garage_url }}" url: "{{ garage_url }}"
dest: "{{ garage_bin }}" dest: "{{ garage_bin }}"
owner: root owner: root
@@ -9,20 +9,22 @@
mode: 0755 mode: 0755
force: true force: true
notify: notify:
- restart garage - Restart garage
- name: install garage systemd file - name: Install garage systemd file
template: ansible.builtin.template:
src: garage.service.j2 src: garage.service.j2
dest: /etc/systemd/system/garage.service dest: /etc/systemd/system/garage.service
mode: 0644
- name: put garage.toml conf file - name: Put garage.toml conf file
template: ansible.builtin.template:
src: garage.toml.j2 src: garage.toml.j2
dest: /etc/garage.toml dest: /etc/garage.toml
mode: 0644
vars: vars:
cluster_group: "{{ group_names | map('regex_search', '.+_cluster') | select('string') | first }}" cluster_group: "{{ group_names | map('regex_search', '.+_cluster') | select('string') | first }}"
cluster_group_length: "{{ groups[cluster_group] | reject('search', 'gw') | length }}" cluster_group_length: "{{ groups[cluster_group] | reject('search', 'gw') | length }}"
garage_replication_mode: "{{ cluster_group_length | int if (cluster_group_length | int) <= 3 else 3 }}" garage_replication_mode: "{{ cluster_group_length | int if (cluster_group_length | int) <= 3 else 3 }}"
notify: notify:
- restart garage - Restart garage

View File

@@ -1,6 +1,6 @@
--- ---
- name: restart haproxy - name: Restart haproxy
service: ansible.builtin.service:
name: haproxy name: haproxy
state: restarted state: restarted

View File

@@ -1,13 +1,14 @@
--- ---
- name: install haproxy package - name: Install haproxy package
package: ansible.builtin.package:
name: haproxy name: haproxy
state: present state: present
- name: haproxy config - name: Haproxy config
template: ansible.builtin.template:
src: haproxy.cfg.j2 src: haproxy.cfg.j2
dest: /etc/haproxy/haproxy.cfg dest: /etc/haproxy/haproxy.cfg
mode: 0644
notify: notify:
- restart haproxy - Restart haproxy

View File

@@ -1,6 +1,6 @@
--- ---
- name: restart icecast2 - name: Restart icecast2
service: ansible.builtin.service:
name: icecast2 name: icecast2
state: restarted state: restarted

View File

@@ -1,13 +1,14 @@
--- ---
- name: install icecast2 - name: Install icecast2
package: ansible.builtin.package:
name: icecast2 name: icecast2
state: present state: present
- name: configuration file - name: Configuration file
template: ansible.builtin.template:
src: icecast.xml.j2 src: icecast.xml.j2
dest: /etc/icecast2/icecast.xml dest: /etc/icecast2/icecast.xml
mode: 0644
notify: notify:
- restart icecast2 - Restart icecast2

View File

@@ -1,6 +1,6 @@
--- ---
- name: restart mailman3 - name: Restart mailman3
service: ansible.builtin.service:
name: mailman3 name: mailman3
state: restarted state: restarted

View File

@@ -1,21 +1,22 @@
--- ---
- name: install mailman3 and dependencies - name: Install mailman3 and dependencies
package: ansible.builtin.package:
name: "{{ item }}" name: "{{ item }}"
state: present state: present
loop: loop:
- mailman3-full - mailman3-full
- sqlite3 - sqlite3
- name: put mailman3 config file - name: Put mailman3 config file
copy: ansible.builtin.copy:
src: ./files/mailman.cfg src: ./files/mailman.cfg
dest: /etc/mailman3/mailman.cfg dest: /etc/mailman3/mailman.cfg
notify: restart mailman3 mode: 0644
notify: Restart mailman3
- name: start mailman3 service - name: Start mailman3 service
service: ansible.builtin.service:
name: mailman3 name: mailman3
state: started state: started
enabled: true enabled: true