Skip to content

Commit

Permalink
add the "always" tag to include_vars
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Jan 11, 2022
1 parent 62a0e7a commit 6acba3c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 deletions.
2 changes: 2 additions & 0 deletions add_balancer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
- name: Include OS-specific variables
include_vars: "vars/{{ ansible_os_family }}.yml"
when: not ansible_os_family == 'Rocky' and not ansible_os_family == 'AlmaLinux'
tags: always

# For compatibility with Ansible old versions
# (support for RockyLinux and AlmaLinux has been added to Ansible 2.11)
- name: Include OS-specific variables
include_vars: "vars/RedHat.yml"
when: ansible_os_family == 'Rocky' or ansible_os_family == 'AlmaLinux'
tags: always

- name: Checking Linux distribution
fail:
Expand Down
18 changes: 12 additions & 6 deletions add_pgnode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
- name: Include OS-specific variables
include_vars: "vars/{{ ansible_os_family }}.yml"
when: not ansible_os_family == 'Rocky' and not ansible_os_family == 'AlmaLinux'
tags: always

# For compatibility with Ansible old versions
# (support for RockyLinux and AlmaLinux has been added to Ansible 2.11)
- name: Include OS-specific variables
include_vars: "vars/RedHat.yml"
when: ansible_os_family == 'Rocky' or ansible_os_family == 'AlmaLinux'
tags: always

- name: Checking Linux distribution
fail:
Expand Down Expand Up @@ -96,13 +98,15 @@
pre_tasks:
- name: Include OS-specific variables
include_vars: "vars/{{ ansible_os_family }}.yml"
when: not ansible_os_family == 'Rocky'
when: not ansible_os_family == 'Rocky' and not ansible_os_family == 'AlmaLinux'
tags: always

# For compatibility with Ansible old versions
# (support for Rocky Linux has been added to Ansible 2.11)
# (support for RockyLinux and AlmaLinux has been added to Ansible 2.11)
- name: Include OS-specific variables
include_vars: "vars/RedHat.yml"
when: ansible_os_family == 'Rocky'
when: ansible_os_family == 'Rocky' or ansible_os_family == 'AlmaLinux'
tags: always
roles:
- role: pgbackrest
when: pgbackrest_install|bool
Expand All @@ -121,13 +125,15 @@
pre_tasks:
- name: Include OS-specific variables
include_vars: "vars/{{ ansible_os_family }}.yml"
when: not ansible_os_family == 'Rocky'
when: not ansible_os_family == 'Rocky' and not ansible_os_family == 'AlmaLinux'
tags: always

# For compatibility with Ansible old versions
# (support for Rocky Linux has been added to Ansible 2.11)
# (support for RockyLinux and AlmaLinux has been added to Ansible 2.11)
- name: Include OS-specific variables
include_vars: "vars/RedHat.yml"
when: ansible_os_family == 'Rocky'
when: ansible_os_family == 'Rocky' or ansible_os_family == 'AlmaLinux'
tags: always

roles:
- role: wal-g
Expand Down
2 changes: 2 additions & 0 deletions balancers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
- name: Include OS-specific variables
include_vars: "vars/{{ ansible_os_family }}.yml"
when: not ansible_os_family == 'Rocky' and not ansible_os_family == 'AlmaLinux'
tags: always

# For compatibility with Ansible old versions
# (support for RockyLinux and AlmaLinux has been added to Ansible 2.11)
- name: Include OS-specific variables
include_vars: "vars/RedHat.yml"
when: ansible_os_family == 'Rocky' or ansible_os_family == 'AlmaLinux'
tags: always

- name: Checking Linux distribution
fail:
Expand Down
18 changes: 12 additions & 6 deletions deploy_pgcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
- name: Include OS-specific variables
include_vars: "vars/{{ ansible_os_family }}.yml"
when: not ansible_os_family == 'Rocky' and not ansible_os_family == 'AlmaLinux'
tags: always

# For compatibility with Ansible old versions
# (support for RockyLinux and AlmaLinux has been added to Ansible 2.11)
- name: Include OS-specific variables
include_vars: "vars/RedHat.yml"
when: ansible_os_family == 'Rocky' or ansible_os_family == 'AlmaLinux'
tags: always

- name: Checking Linux distribution
fail:
Expand Down Expand Up @@ -118,13 +120,15 @@
pre_tasks:
- name: Include OS-specific variables
include_vars: "vars/{{ ansible_os_family }}.yml"
when: not ansible_os_family == 'Rocky'
when: not ansible_os_family == 'Rocky' and not ansible_os_family == 'AlmaLinux'
tags: always

# For compatibility with Ansible old versions
# (support for Rocky Linux has been added to Ansible 2.11)
# (support for RockyLinux and AlmaLinux has been added to Ansible 2.11)
- name: Include OS-specific variables
include_vars: "vars/RedHat.yml"
when: ansible_os_family == 'Rocky'
when: ansible_os_family == 'Rocky' or ansible_os_family == 'AlmaLinux'
tags: always
roles:
- role: pgbackrest
when: pgbackrest_install|bool
Expand All @@ -141,13 +145,15 @@
pre_tasks:
- name: Include OS-specific variables
include_vars: "vars/{{ ansible_os_family }}.yml"
when: not ansible_os_family == 'Rocky'
when: not ansible_os_family == 'Rocky' and not ansible_os_family == 'AlmaLinux'
tags: always

# For compatibility with Ansible old versions
# (support for Rocky Linux has been added to Ansible 2.11)
# (support for RockyLinux and AlmaLinux has been added to Ansible 2.11)
- name: Include OS-specific variables
include_vars: "vars/RedHat.yml"
when: ansible_os_family == 'Rocky'
when: ansible_os_family == 'Rocky' or ansible_os_family == 'AlmaLinux'
tags: always

roles:
- role: wal-g
Expand Down
2 changes: 2 additions & 0 deletions etcd_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
- name: Include OS-specific variables
include_vars: "vars/{{ ansible_os_family }}.yml"
when: not ansible_os_family == 'Rocky' and not ansible_os_family == 'AlmaLinux'
tags: always

# For compatibility with Ansible old versions
# (support for RockyLinux and AlmaLinux has been added to Ansible 2.11)
- name: Include OS-specific variables
include_vars: "vars/RedHat.yml"
when: ansible_os_family == 'Rocky' or ansible_os_family == 'AlmaLinux'
tags: always

- name: Update apt cache
apt:
Expand Down

0 comments on commit 6acba3c

Please sign in to comment.