diff --git a/roles/fas_client/tasks/main.yml b/roles/fas_client/tasks/main.yml index 0dfa32434c..a0cc00f0bb 100644 --- a/roles/fas_client/tasks/main.yml +++ b/roles/fas_client/tasks/main.yml @@ -21,14 +21,14 @@ src=$files/hotfix/python-fedora/proxyclient.py dest=/usr/lib/python2.6/site-packages/fedora/client/proxyclient.py owner=root mode=644 - only_if: "'${ansible_distribution}' == 'RedHat'" + when: is_rhel == 'True' tags: - hotfix - packages - name: install nss_db on rhel hosts only yum: state=installed name=nss_db - only_if: "'${ansible_distribution}' == 'RedHat'" + when: is_rhel == 'True' tags: - packages diff --git a/tasks/koji/base_builder.yml b/tasks/koji/base_builder.yml index 9cfd37c3c4..f3ccd3b0c4 100644 --- a/tasks/koji/base_builder.yml +++ b/tasks/koji/base_builder.yml @@ -57,24 +57,24 @@ - name: /etc/kojid/kojid.conf action: copy src=$files/kojibuilder/kojid.conf dest=/etc/kojid/kojid.conf - only_if: "not '${inventory_hostname}'.startswith(('arm01','arm03'))" + when: not inventory_hostname.startswith(('arm01','arm03')) notify: - restart kojid - name: arm /etc/kojid/kojid.conf action: copy src=$files/kojibuilder/arm-kojid.conf dest=/etc/kojid/kojid.conf - only_if: "'${inventory_hostname}'.startswith(('arm01','arm03'))" + when: inventory_hostname.startswith(('arm01','arm03')) notify: - restart kojid - name: /etc/koji/koji.conf action: copy src=$files/kojibuilder/koji.conf dest=/etc/koji.conf - only_if: "not '${inventory_hostname}'.startswith(('arm01','arm03'))" + when: not inventory_hostname.startswith(('arm01','arm03')) - name: /etc/koji/koji.conf action: copy src=$files/kojibuilder/arm-koji.conf dest=/etc/koji.conf - only_if: "'${inventory_hostname}'.startswith(('arm01','arm03'))" + when: inventory_hostname.startswith(('arm01','arm03')) - name: copy over koji ca cert action: copy src=$private/files/koji/buildercerts/fedora-ca.cert dest=/etc/kojid/cacert.pem @@ -133,7 +133,7 @@ - name: mock site-defaults.cfg action: copy src=$files/kojibuilder/builders/site-defaults.cfg dest=/etc/mock/site-defaults.cfg mode=0644 owner=root group=mock - only_if: "not '${inventory_hostname}'.startswith(('bkernel'))" + when: not inventory_hostname.startswith(('bkernel') - name: ntp steptickers action: copy src=$files/common/step-tickers dest=/etc/ntp/step-tickers diff --git a/tasks/koji/releng_config.yml b/tasks/koji/releng_config.yml index 217237feaa..504d722a8a 100644 --- a/tasks/koji/releng_config.yml +++ b/tasks/koji/releng_config.yml @@ -139,12 +139,12 @@ # put cron job in for branched compose - name: branched compose cron action: copy src=$files/releng/branched dest=/etc/cron.d/branched - only_if: "'${inventory_hostname}'.startswith('releng01')" + when: inventory_hostname.startswith('releng01') # put cron job in for rawhide compose - name: rawhide compose cron action: copy src=$files/releng/rawhide dest=/etc/cron.d/rawhide - only_if: "'${inventory_hostname}'.startswith('releng02')" + when: inventory_hostname.startswith('releng02') - name: sudoers defaults action: copy src=$private/files/sudo/releng-sudoers dest=/etc/sudoers mode=0440 diff --git a/tasks/serialgetty.yml b/tasks/serialgetty.yml index df1158e84f..a98b222577 100644 --- a/tasks/serialgetty.yml +++ b/tasks/serialgetty.yml @@ -2,6 +2,6 @@ - name: upstart serial setup action: copy src=$files/common/ttyS0.conf dest=/etc/init/ttyS0.conf - only_if: '$is_rhel' + when: is_rhel == 'True' tags: - configs diff --git a/tasks/sign_setup.yml b/tasks/sign_setup.yml index 69a1b8f1c3..2482951b12 100644 --- a/tasks/sign_setup.yml +++ b/tasks/sign_setup.yml @@ -4,7 +4,7 @@ action: copy src=$files/sign/$item dest=/etc/yum.repos.d/$item with_items: - builder-rpms.repo - only_if: '$is_rhel' + when: is_rhel == 'True' tags: - config - packages