Skip to content

Commit

Permalink
Improve jinja spacing (#413)
Browse files Browse the repository at this point in the history
This commit aims to improve jinja spacing. To achieve this, the jinja[spacing] section has been removed from the .config/ansible-lint.yml file.
  • Loading branch information
pa-decarvalho committed Jul 14, 2023
1 parent d996f08 commit 51f17d6
Show file tree
Hide file tree
Showing 28 changed files with 144 additions and 154 deletions.
1 change: 0 additions & 1 deletion .config/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ skip_list:
- experimental # all rules tagged as experimental
- ignore-errors
- jinja[invalid] # TODO
- jinja[spacing] # TODO
- key-order[task] # TODO
- name[casing] # TODO: All names should start with an uppercase letter.
- name[missing] # All tasks should be named.
Expand Down
4 changes: 2 additions & 2 deletions balancers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
ansible.builtin.set_fact:
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var | default([]) + (firewall_allowed_tcp_ports_for[item] | default([])) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
when: firewall_enabled_at_boot | bool
tags: firewall

- name: Build a firewall_rules_dynamic_var
ansible.builtin.set_fact:
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var | default([]) + (firewall_additional_rules_for[item] | default([])) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
when: firewall_enabled_at_boot | bool
tags: firewall

roles:
Expand Down
4 changes: 2 additions & 2 deletions config_pgcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@
ansible.builtin.set_fact:
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var | default([]) + (firewall_allowed_tcp_ports_for[item] | default([])) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
when: firewall_enabled_at_boot | bool
tags: config_firewall, firewall

- name: Build a firewall_rules_dynamic_var
ansible.builtin.set_fact:
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var | default([]) + (firewall_additional_rules_for[item] | default([])) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
when: firewall_enabled_at_boot | bool
tags: firewall

roles:
Expand Down
4 changes: 2 additions & 2 deletions consul.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@
ansible.builtin.set_fact:
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var | default([]) + (firewall_allowed_tcp_ports_for[item] | default([])) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
when: firewall_enabled_at_boot | bool
tags: firewall

- name: Build a firewall_rules_dynamic_var
ansible.builtin.set_fact:
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var | default([]) + (firewall_additional_rules_for[item] | default([])) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
when: firewall_enabled_at_boot | bool
tags: firewall

roles:
Expand Down
4 changes: 2 additions & 2 deletions deploy_pgcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@
ansible.builtin.set_fact:
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var | default([]) + (firewall_allowed_tcp_ports_for[item] | default([])) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
when: firewall_enabled_at_boot | bool
tags: firewall

- name: Build a firewall_rules_dynamic_var
ansible.builtin.set_fact:
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var | default([]) + (firewall_additional_rules_for[item] | default([])) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
when: firewall_enabled_at_boot | bool
tags: firewall

roles:
Expand Down
4 changes: 2 additions & 2 deletions etcd_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
ansible.builtin.set_fact:
firewall_ports_dynamic_var: "{{ firewall_ports_dynamic_var | default([]) + (firewall_allowed_tcp_ports_for[item] | default([])) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
when: firewall_enabled_at_boot | bool
tags: firewall

- name: Build a firewall_rules_dynamic_var
ansible.builtin.set_fact:
firewall_rules_dynamic_var: "{{ firewall_rules_dynamic_var | default([]) + (firewall_additional_rules_for[item] | default([])) }}"
loop: "{{ hostvars[inventory_hostname].group_names }}"
when: firewall_enabled_at_boot|bool
when: firewall_enabled_at_boot | bool
tags: firewall

roles:
Expand Down
2 changes: 1 addition & 1 deletion molecule/postgrespro/vars/postgrespro_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ yum_repository:
apt_repository_keys:
- key: "https://repo.postgrespro.ru/keys/GPG-KEY-POSTGRESPRO"
apt_repository:
- repo: "deb https://repo.postgrespro.ru//pgpro-archive/pgpro-{{ postgrespro_minor_version }}/{{ ansible_distribution |lower }}/ {{ ansible_distribution_release }} main"
- repo: "deb https://repo.postgrespro.ru//pgpro-archive/pgpro-{{ postgrespro_minor_version }}/{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} main"

install_postgresql_repo: false

Expand Down
14 changes: 7 additions & 7 deletions remove_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,34 @@
state: stopped
enabled: false
ignore_errors: true
when: remove_postgres|bool
when: remove_postgres | bool
- name: Delete PostgreSQL database content
ansible.builtin.file:
path: "{{ postgresql_data_dir }}"
state: absent
when: remove_postgres|bool
when: remove_postgres | bool
- name: Delete PgBackRest repository
ansible.builtin.file:
# path: pgbackrest_conf global repo1-path
path: /var/lib/pgbackrest
state: absent
when: pgbackrest_install|bool
when: pgbackrest_install | bool
- name: Delete PgBackRest cron
ansible.builtin.file:
path: /etc/cron.d/pgbackrest
state: absent
when: pgbackrest_install|bool
when: pgbackrest_install | bool
- name: Stop Consul service
ansible.builtin.service:
name: consul
state: stopped
enabled: false
when: remove_consul|bool
when: remove_consul | bool
- name: Delete Consul content
ansible.builtin.file:
path: "{{ consul_data_path }}"
state: absent
when: remove_consul|bool
when: remove_consul | bool

- name: remove_cluster.yml | Etcd Cluster Play
hosts: etcd_cluster
Expand All @@ -61,4 +61,4 @@
ansible.builtin.file:
path: "{{ etcd_data_dir }}/member"
state: absent
when: remove_etcd|bool
when: remove_etcd | bool
Loading

0 comments on commit 51f17d6

Please sign in to comment.