forked from finallycoffee/base
chore: jinja2 spacing, variable naming
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
path: "{{ minio_data_path }}"
|
path: "{{ minio_data_path }}"
|
||||||
state: directory
|
state: directory
|
||||||
user: "{{ minio_user | default(omit, True) }}"
|
user: "{{ minio_user | default(omit, True) }}"
|
||||||
group: "{{ minio_user| default(omit, True) }}"
|
group: "{{ minio_user | default(omit, True) }}"
|
||||||
when: minio_manage_host_filesystem
|
when: minio_manage_host_filesystem
|
||||||
|
|
||||||
- name: Ensure container image '{{ minio_container_image }}' is {{ minio_state }}
|
- name: Ensure container image '{{ minio_container_image }}' is {{ minio_state }}
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
labels: "{{ minio_container_labels }}"
|
labels: "{{ minio_container_labels }}"
|
||||||
networks: "{{ minio_container_networks }}"
|
networks: "{{ minio_container_networks }}"
|
||||||
ports: "{{ minio_container_ports }}"
|
ports: "{{ minio_container_ports }}"
|
||||||
user: "{{ minio_user|default(omit, True) }}"
|
user: "{{ minio_user | default(omit, True) }}"
|
||||||
command: "{{ minio_container_command }}"
|
command: "{{ minio_container_command }}"
|
||||||
restart_policy: "{{ minio_container_restart_policy }}"
|
restart_policy: "{{ minio_container_restart_policy }}"
|
||||||
state: "{{ minio_container_state }}"
|
state: "{{ minio_container_state }}"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- name: Ensure config attributes are configured
|
- name: Ensure config attributes are configured
|
||||||
community.general.ldap_attrs:
|
community.general.ldap_attrs:
|
||||||
dn: "{{ openldap_config_dn }}"
|
dn: "{{ openldap_config_dn }}"
|
||||||
attributes: "{{ { entry.key : entry.value } }}"
|
attributes: "{{ {entry.key: entry.value} }}"
|
||||||
state: exact
|
state: exact
|
||||||
server_uri: "{{ openldap_socket_url }}"
|
server_uri: "{{ openldap_socket_url }}"
|
||||||
loop: "{{ openldap_config_attributes | dict2items }}"
|
loop: "{{ openldap_config_attributes | dict2items }}"
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
- name: Ensure config db attributes are configured
|
- name: Ensure config db attributes are configured
|
||||||
community.general.ldap_attrs:
|
community.general.ldap_attrs:
|
||||||
dn: "{{ openldap_config_db_dn }}"
|
dn: "{{ openldap_config_db_dn }}"
|
||||||
attributes: "{{ { entry.key: entry.value } }}"
|
attributes: "{{ {entry.key: entry.value} }}"
|
||||||
state: exact
|
state: exact
|
||||||
server_uri: "{{ openldap_socket_url }}"
|
server_uri: "{{ openldap_socket_url }}"
|
||||||
loop: "{{ openldap_config_db_attributes | dict2items }}"
|
loop: "{{ openldap_config_db_attributes | dict2items }}"
|
||||||
|
|||||||
@@ -22,4 +22,3 @@
|
|||||||
{{ openldap_container_restart_policy | default(omit, true) }}
|
{{ openldap_container_restart_policy | default(omit, true) }}
|
||||||
healthcheck: "{{ openldap_container_healthcheck | default(omit, true) }}"
|
healthcheck: "{{ openldap_container_healthcheck | default(omit, true) }}"
|
||||||
state: "{{ openldap_container_state }}"
|
state: "{{ openldap_container_state }}"
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
- name: Ensure additional schemas are mapped to container
|
- name: Ensure additional schemas are mapped to container
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
openldap_init_container_volumes: >-2
|
openldap_init_container_volumes: >-2
|
||||||
{{ openldap_init_container_volumes + [ schema_mount ] }}
|
{{ openldap_init_container_volumes + [schema_mount] }}
|
||||||
vars:
|
vars:
|
||||||
schema_file: "{{ openldap_schema_path }}/{{ schema.name }}.ldif"
|
schema_file: "{{ openldap_schema_path }}/{{ schema.name }}.ldif"
|
||||||
schema_mount: >-2
|
schema_mount: >-2
|
||||||
|
|||||||
@@ -18,10 +18,10 @@
|
|||||||
msg: "`restic_backup_stdin_command` was set but no filename for the resulting output was supplied in `restic_backup_stdin_command_filename`"
|
msg: "`restic_backup_stdin_command` was set but no filename for the resulting output was supplied in `restic_backup_stdin_command_filename`"
|
||||||
|
|
||||||
- name: Ensure backup frequency adheres to systemd's OnCalender syntax
|
- name: Ensure backup frequency adheres to systemd's OnCalender syntax
|
||||||
command:
|
ansible.builtin.command:
|
||||||
cmd: "systemd-analyze calendar {{ restic_policy.frequency }}"
|
cmd: "systemd-analyze calendar {{ restic_policy.frequency }}"
|
||||||
register: systemd_calender_parse_res
|
register: restic_systemd_calender_parse_result
|
||||||
failed_when: systemd_calender_parse_res.rc != 0
|
failed_when: restic_systemd_calender_parse_result.rc != 0
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Ensure restic is installed
|
- name: Ensure restic is installed
|
||||||
@@ -42,13 +42,21 @@
|
|||||||
state: present
|
state: present
|
||||||
when: ansible_os_family not in ['RedHat', 'Debian']
|
when: ansible_os_family not in ['RedHat', 'Debian']
|
||||||
|
|
||||||
|
- name: Ensure backup script is templated
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: restic-backup-directories.sh
|
||||||
|
dest: /opt/restic-backup-directories.sh
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
- name: Ensure systemd service file for '{{ restic_job_name }}' is templated
|
- name: Ensure systemd service file for '{{ restic_job_name }}' is templated
|
||||||
template:
|
template:
|
||||||
dest: "/etc/systemd/system/{{ restic_systemd_unit_naming_scheme }}.service"
|
dest: "/etc/systemd/system/{{ restic_systemd_unit_naming_scheme }}.service"
|
||||||
src: restic.service.j2
|
src: restic.service.j2
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0640
|
mode: "0640"
|
||||||
notify:
|
notify:
|
||||||
- reload-systemd
|
- reload-systemd
|
||||||
- trigger-restic
|
- trigger-restic
|
||||||
@@ -59,7 +67,7 @@
|
|||||||
src: restic.timer.j2
|
src: restic.timer.j2
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0640
|
mode: "0640"
|
||||||
notify:
|
notify:
|
||||||
- reload-systemd
|
- reload-systemd
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user