Skip to content

Commit

Permalink
Force bool type for conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
Thilo Solbrig authored and Rendanic committed Oct 15, 2024
1 parent b20197d commit 370ab61
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions changelogs/fragments/motd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
bugfixes:
- "common: Exclude alias interfaces when templating motd.j2 (oravirt#486)"
- "common: force bool type in certain conditionals"
8 changes: 4 additions & 4 deletions roles/common/tasks/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
- name: Install EPEL Repo
when:
- configure_epel_repo
- configure_epel_repo | bool
tags:
- epelrepo
block:
Expand All @@ -22,7 +22,7 @@
path: /usr/bin/ol_yum_configure.sh
register: olyumconfigfile
when:
- configure_public_yum_repo
- configure_public_yum_repo | bool
- ansible_distribution == 'OracleLinux'
tags:
- olrepo
Expand All @@ -36,7 +36,7 @@
mode: 0644
when:
- not olyumconfigfile.stat.exists | default(false)
- configure_public_yum_repo
- configure_public_yum_repo | bool
- ansible_distribution == 'OracleLinux'
- ansible_distribution_major_version is version('7', '=')
tags:
Expand All @@ -47,7 +47,7 @@
name: "{{ common_packages }}"
state: installed
when:
- install_os_packages
- install_os_packages | bool
tags:
- commonpackages
notify: Reboot concerning package updates
2 changes: 1 addition & 1 deletion roles/common/tasks/Suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: "{{ common_packages_sles }}"
state: installed
when:
- install_os_packages
- install_os_packages | bool
tags:
- commonpackages
notify: Reboot concerning package updates
4 changes: 2 additions & 2 deletions roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
name: "{{ ntp_type }}d"
state: started
enabled: true
when: configure_ntp
when: configure_ntp | bool

- name: Add motd
ansible.builtin.template:
src: "{{ motd_template }}"
dest: /etc/motd
mode: 0644
tags: motd
when: configure_motd
when: configure_motd | bool

0 comments on commit 370ab61

Please sign in to comment.