]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
testnode: Fix jinja2 conditional 681/head
authorDavid Galloway <dgallowa@redhat.com>
Wed, 8 Jun 2022 14:05:49 +0000 (10:05 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 8 Jun 2022 14:07:49 +0000 (10:07 -0400)
https://docs.ansible.com/ansible/latest/dev_guide/testing/sanity/no-tests-as-filters.html

Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/testnode/tasks/yum/baseurls_not_mirrorlists.yml

index 5292b568f8f886d2f8a16a2c0a2ce135e7b8cc6e..b458bf59224fb0f2e452af4d07fddac12429f1cf 100644 (file)
   args:
     chdir: /etc/yum.repos.d
   register: repo_files_with_mirrorlists
-  when: use_baseurls|bool is true
+  when: use_baseurls|bool
 
 - name: Comment mirrorlist parameter in each repo
   shell: "sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/{{ item }}.repo"
   with_items: "{{ repo_files_with_mirrorlists.stdout_lines }}"
-  when: use_baseurls|bool is true
+  when: use_baseurls|bool
 
 - name: Use a baseurl instead
   shell: "echo 'baseurl=http://packages.oit.ncsu.edu/centos/{{ ansible_distribution_major_version }}{{ dash_stream }}/{% if item == \"CentOS-Extras\" %}extras{% else %}{{ item | regex_replace('CentOS-','') }}{% endif %}/{{ ansible_architecture }}/os/' >> /etc/yum.repos.d/{{ item }}.repo"
   with_items: "{{ repo_files_with_mirrorlists.stdout_lines }}"
-  when: use_baseurls|bool is true
+  when: use_baseurls|bool