Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README-ostree.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Usage:
.ostree/get_ostree_data.sh packages runtime DISTRO-VERSION FORMAT
```

`DISTRO-VERSION` is in the format that Ansible uses for `ansible_distribution`
and `ansible_distribution_version` - for example, `Fedora-38`, `CentOS-8`,
`DISTRO-VERSION` is in the format that Ansible uses for `ansible_facts["distribution"]`
and `ansible_facts["distribution_version"]` - for example, `Fedora-38`, `CentOS-8`,
`RedHat-9.4`

`FORMAT` is one of `toml`, `json`, `yaml`, `raw`
Expand Down
4 changes: 2 additions & 2 deletions tasks/manage_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: Apply changes
when: __postfix_has_config_changed | d("") is search("True")
block:
- name: Gather facts for ansible_date_time
- name: Gather facts for ansible_facts["date_time"]
setup:
filter: ansible_date_time
when: postfix_backup_multiple | bool
Expand All @@ -13,7 +13,7 @@
remote_src: true
src: /etc/postfix/main.cf
dest: /etc/postfix/main.cf.{{ postfix_backup_multiple |
ternary(ansible_date_time.iso8601, "backup") }}
ternary(ansible_facts['date_time']['iso8601'], "backup") }}
mode: "0644"
when: postfix_backup or postfix_backup_multiple

Expand Down
8 changes: 4 additions & 4 deletions tasks/set_facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
- name: Set platform/version specific variables
include_vars: "{{ __postfix_vars_file }}"
loop:
- "{{ ansible_os_family }}.yml"
- "{{ ansible_distribution }}.yml"
- "{{ ansible_distribution }}_{{ ansible_distribution_major_version }}.yml"
- "{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml"
- "{{ ansible_facts['os_family'] }}.yml"
- "{{ ansible_facts['distribution'] }}.yml"
- "{{ ansible_facts['distribution'] }}_{{ ansible_facts['distribution_major_version'] }}.yml"
- "{{ ansible_facts['distribution'] }}_{{ ansible_facts['distribution_version'] }}.yml"
vars:
__postfix_vars_file: "{{ role_path }}/vars/{{ item }}"
when: __postfix_vars_file is file
4 changes: 2 additions & 2 deletions tests/vars/rh_distros_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ __postfix_rh_distros:
__postfix_rh_distros_fedora: "{{ __postfix_rh_distros + ['Fedora'] }}"

# Use this in conditionals to check if distro is Red Hat or clone
__postfix_is_rh_distro: "{{ ansible_distribution in __postfix_rh_distros }}"
__postfix_is_rh_distro: "{{ ansible_facts['distribution'] in __postfix_rh_distros }}"

# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
__postfix_is_rh_distro_fedora: "{{ ansible_distribution in __postfix_rh_distros_fedora }}"
__postfix_is_rh_distro_fedora: "{{ ansible_facts['distribution'] in __postfix_rh_distros_fedora }}"
4 changes: 2 additions & 2 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ __postfix_rh_distros:
__postfix_rh_distros_fedora: "{{ __postfix_rh_distros + ['Fedora'] }}"

# Use this in conditionals to check if distro is Red Hat or clone
__postfix_is_rh_distro: "{{ ansible_distribution in __postfix_rh_distros }}"
__postfix_is_rh_distro: "{{ ansible_facts['distribution'] in __postfix_rh_distros }}"

# Use this in conditionals to check if distro is Red Hat or clone, or Fedora
__postfix_is_rh_distro_fedora: "{{ ansible_distribution in __postfix_rh_distros_fedora }}"
__postfix_is_rh_distro_fedora: "{{ ansible_facts['distribution'] in __postfix_rh_distros_fedora }}"
# END - DO NOT EDIT THIS BLOCK - rh distros variables
Loading