Skip to content

Commit

Permalink
Fix various inconsequential yamllint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
amenonsen authored and haroon-github committed Jan 2, 2023
1 parent c072d5e commit a68faeb
Show file tree
Hide file tree
Showing 99 changed files with 188 additions and 164 deletions.
14 changes: 14 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---

extends: default

ignore: |
.github/
tpa-venv/
collections/
.prospector.yaml
rules:
line-length: disable
indentation: disable
truthy: disable
4 changes: 2 additions & 2 deletions architectures/BDR-Always-ON/commands/pool-disable-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# cluster.

- name: Collect haproxy facts for cluster {{ cluster_dir }}
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand Down Expand Up @@ -57,7 +57,7 @@
# instances (if any).

- name: Remove instance {{ disable_instance }} from haproxy server pools
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
tags: always

- name: Add instance {{ enable_instance }} to haproxy servers for cluster {{ cluster_dir }}
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand Down
4 changes: 2 additions & 2 deletions architectures/BDR-Always-ON/commands/update-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# on the whims of the network.)

- name: Collect update facts for cluster {{ cluster_dir }}
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand Down Expand Up @@ -68,7 +68,7 @@
# instances are updated last in the cycle).

- name: Update postgres on instances in cluster {{ cluster_dir }}
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand Down
2 changes: 1 addition & 1 deletion architectures/Images/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
tags: always

- name: Set up TPA image nodes
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: true
Expand Down
2 changes: 1 addition & 1 deletion architectures/M1/commands/switchover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
tags: always

- name: Perform switchover to {{ target }} on cluster {{ cluster_dir }}
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand Down
8 changes: 4 additions & 4 deletions architectures/M1/commands/update-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
tags: always

- name: Stop repmgr
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand All @@ -21,7 +21,7 @@
'postgres' in role
- name: Update postgres on replicas in cluster {{ cluster_dir }}
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand All @@ -34,7 +34,7 @@
'replica' in role
- name: Update postgres on primary in cluster {{ cluster_dir }}
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand Down Expand Up @@ -65,7 +65,7 @@
'primary' in role
- name: Start repmgr again
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand Down
2 changes: 1 addition & 1 deletion architectures/lib/commands/eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
tags: always

- name: Evaluate expression
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
hosts: "{{ eval_hosts|default('all') }}"
tasks:
Expand Down
4 changes: 2 additions & 2 deletions architectures/lib/commands/rebuild-sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# © Copyright EnterpriseDB UK Limited 2015-2022 - All rights reserved.

- name: Rebuild postgres on cluster {{ cluster_dir }}
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
hosts: all
tasks:
- shell: test -x /etc/tpa/rebuild-sources.sh && /etc/tpa/rebuild-sources.sh
changed_when: False
changed_when: false
become_user: root
become: yes
4 changes: 2 additions & 2 deletions architectures/lib/commands/start-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# instances in the cluster. First, we unlock any LUKS-encrypted volumes.

- name: Start Postgres on cluster {{ cluster_dir }}
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand All @@ -35,7 +35,7 @@
state: started

- command: /etc/tpa/postgres-monitor "{{ postgres_dsn }}"
changed_when: False
changed_when: false
become_user: "{{ postgres_user }}"
become: yes

Expand Down
2 changes: 1 addition & 1 deletion architectures/lib/commands/stop-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# We stop services and unmount and close any LUKS-encrypted volumes.

- name: Start Postgres on cluster {{ cluster_dir }}
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand Down
2 changes: 1 addition & 1 deletion architectures/lib/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
tags: always

- name: Set up TPA cluster nodes
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: true
Expand Down
2 changes: 1 addition & 1 deletion architectures/lib/fini.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# end of deployment.

- name: Run final cluster-wide tasks
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
become_user: root
become: yes
Expand Down
2 changes: 1 addition & 1 deletion architectures/lib/init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# hosts are available, and perform basic fact discovery.

- name: Basic initialisation and fact discovery
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
strategy: linear
environment: "{{ target_environment|default({}) }}"
Expand Down
2 changes: 1 addition & 1 deletion architectures/lib/tests/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# © Copyright EnterpriseDB UK Limited 2015-2022 - All rights reserved.

- name: Run default cluster tests
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
hosts: all
tasks:
Expand Down
4 changes: 3 additions & 1 deletion lib/tests/config/cluster-basic/config.yml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{}
---

{}
1 change: 0 additions & 1 deletion platforms/aws/deprovision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,3 @@
- inventory/ec2.ini
- prehydrate-vars.yml
- inventory/aws_ec2.yml

2 changes: 1 addition & 1 deletion platforms/aws/terminate-for-rehydration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# © Copyright EnterpriseDB UK Limited 2015-2022 - All rights reserved.

- hosts: all
any_errors_fatal: True
any_errors_fatal: true
max_fail_percentage: 0
environment: "{{ target_environment|default({}) }}"
tasks:
Expand Down
3 changes: 1 addition & 2 deletions platforms/common/deprovision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
find_cmd: >-
find "{{ cluster_dir }}"/inventory -depth -type d
register: rmdir
ignore_errors: yes
ignore_errors: true
changed_when: >
rmdir.rc == 99 and 'Directory not empty' not in rmdir.stderr
failed_when: rmdir.rc not in [0, 99]

6 changes: 3 additions & 3 deletions platforms/common/inventory/post-write.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
args:
chdir: "{{ cluster_dir }}"
register: existing_tower_remote_url
ignore_errors: yes
ignore_errors: true

- name: Fail if remote repository does not match configured ansible_tower.git_repository
assert:
Expand Down Expand Up @@ -61,15 +61,15 @@
args:
chdir: "{{ cluster_dir }}"
register: added_files
ignore_errors: yes
ignore_errors: true

- name: Check for modified files
shell:
cmd: git status --porcelain -uno | egrep '^(A|M| M)'
args:
chdir: "{{ cluster_dir }}"
register: commit_required
ignore_errors: yes
ignore_errors: true

- name: Commit modifications if required
command:
Expand Down
2 changes: 1 addition & 1 deletion platforms/common/inventory/write.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
args:
chdir: "{{ cluster_dir }}/inventory"
executable: /bin/bash
ignore_errors: yes
ignore_errors: true
changed_when: false
vars:
hostlist: >
Expand Down
2 changes: 1 addition & 1 deletion platforms/common/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
args:
chdir: "{{ cluster_dir }}"
creates: "{{ ssh_key_file }}.ppk"
ignore_errors: yes
ignore_errors: true
when: >
lookup('pipe', 'command -v puttygen || true') != ''
and ssh_key_file == default_ssh_key_file
Expand Down
6 changes: 3 additions & 3 deletions platforms/common/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
chdir: "{{ cluster_dir }}"
executable: /bin/bash
register: git_repo_note
changed_when: False
changed_when: false

- set_fact:
tpaexec_initialised_cluster_git_repo: "{{
Expand All @@ -157,8 +157,8 @@
args:
chdir: "{{ cluster_dir }}"
register: modified_files
changed_when: False
ignore_errors: yes
changed_when: false
ignore_errors: true
when: tpaexec_initialised_cluster_git_repo

- name: Abort if there are uncommitted changes
Expand Down
2 changes: 1 addition & 1 deletion roles/barman/final/tasks/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/usr/bin/barman check all
delegate_to: "{{ this_barman }}"
changed_when: false
ignore_errors: yes
ignore_errors: true
become_user: barman
become: yes

Expand Down
2 changes: 1 addition & 1 deletion roles/barman/first-backup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
barman diagnose
register: diagnosis
delegate_to: "{{ this_barman }}"
changed_when: False
changed_when: false
become_user: barman
become: yes
check_mode: no
Expand Down
1 change: 0 additions & 1 deletion roles/barman/tasks/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@
/etc/tpa/barman-home-ok && /usr/bin/barman backup {{ backup_name }}
state: present
delegate_to: "{{ this_barman }}"

4 changes: 2 additions & 2 deletions roles/barman/tasks/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
if command -v $p >/dev/null 2>&1; then echo $p; break; fi;
done
register: compressor
changed_when: False
changed_when: false
check_mode: no

- name: Set default_barman_compression
Expand Down Expand Up @@ -101,7 +101,7 @@
command: >
find ~barman/.postgresql -name '*.crt' -o -name '*.key'
register: keycertfiles
changed_when: False
changed_when: false
check_mode: no

- name: Set correct ownership and mode on key/certificate files
Expand Down
3 changes: 3 additions & 0 deletions roles/efm/config/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
---

# © Copyright EnterpriseDB UK Limited 2015-2022 - All rights reserved.

efm_conf_settings: {}
4 changes: 4 additions & 0 deletions roles/efm/config/vars/log-server-defined.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---

# © Copyright EnterpriseDB UK Limited 2015-2022 - All rights reserved.

syslog_efm_conf_settings:
'syslog.enabled': true
'syslog.host': "{{ inventory_hostname }}"
1 change: 0 additions & 1 deletion roles/efm/final/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
name: efm/restart
apply:
tags: [efm, restart]

2 changes: 1 addition & 1 deletion roles/haproxy/config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
name: haproxy_connect_any
state: yes
persistent: yes
ignore_errors: yes
ignore_errors: true

- name: Enable haproxy service
service:
Expand Down
3 changes: 0 additions & 3 deletions roles/pem/agent/config/final/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
pem_agent_config_path: "{{ pem_agent_base_dir }}/etc/agent.cfg"
pem_agent_certificate_directory: /root/.pem

# pg-backup-api client cert vars
pemagent_CN: pemagent_{{ inventory_hostname }}
# permission on node
pemagent_clientcert_owner: "{{ pem_group|default('root') }}"
pemagent_clientcert_group: "{{ pem_group|default('root') }}"
pemagent_clientcert_service: "{{ pemagent_CN }}"
# node artifacts path
pemagent_csr_path: "{{ pgbapi_ssl_dir }}/{{ pemagent_clientcert_service }}.csr"
pemagent_privatekey_path: "{{ pgbapi_ssl_dir }}/{{ pemagent_clientcert_service }}.key"
pemagent_certificate_path: "{{ pgbapi_ssl_dir }}/{{ pemagent_clientcert_service }}.crt"
Loading

0 comments on commit a68faeb

Please sign in to comment.