From a8714caab3df6e13e4b5d4fd0e412efc5bda47d2 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 7 May 2018 23:51:48 +0000 Subject: [PATCH] first cut at changing all the old |changed to is changed per ansible deprecations --- playbooks/groups/osbs-cluster.yml | 14 +++++++------- roles/anitya/fedmsg/tasks/main.yml | 2 +- roles/autocloud/backend/tasks/main.yml | 2 +- roles/autocloudreporter/tasks/main.yml | 2 +- roles/base/tasks/main.yml | 4 ++-- roles/check-compose/tasks/main.yml | 2 +- roles/collectd/base/tasks/main.yml | 4 ++-- roles/collectd/fcomm-queue/tasks/main.yml | 2 +- roles/copr/backend/tasks/main.yml | 2 +- roles/copr/dist_git/tasks/main.yml | 2 +- roles/copr/keygen/tasks/main.yml | 2 +- roles/distgit/tasks/main.yml | 4 ++-- roles/fedmsg/base/tasks/main.yml | 2 +- roles/haproxy/tasks/main.yml | 2 +- roles/hubs/tasks/db-postgresql.yml | 2 +- roles/keyserver/tasks/main.yml | 2 +- roles/mirrormanager/mirrorlist2/tasks/main.yml | 2 +- .../mirrormanager/mirrorlist_proxy/tasks/main.yml | 2 +- roles/nagios_client/tasks/main.yml | 4 ++-- roles/nagios_server/tasks/main.yml | 2 +- roles/openqa/dispatcher/tasks/main.yml | 2 +- roles/openqa/server/tasks/main.yml | 10 +++++----- roles/openqa/worker/tasks/main.yml | 2 +- roles/pagure/fedmsg/tasks/main.yml | 2 +- roles/pagure/frontend/tasks/main.yml | 2 +- roles/pagure/upstreamfirst-frontend/tasks/main.yml | 2 +- roles/relvalconsumer/tasks/main.yml | 2 +- tasks/persistent_cloud.yml | 2 +- 28 files changed, 42 insertions(+), 42 deletions(-) diff --git a/playbooks/groups/osbs-cluster.yml b/playbooks/groups/osbs-cluster.yml index 28a709c621..021dd906c8 100644 --- a/playbooks/groups/osbs-cluster.yml +++ b/playbooks/groups/osbs-cluster.yml @@ -579,13 +579,13 @@ shell: "docker tag {{item}} {{docker_registry}}/{{item}}" with_items: "{{fedora_required_images}}" delegate_to: "{{ composer }}" - when: docker_pull_fedora_delegated|changed + when: docker_pull_fedora_delegated is changed - name: push fedora required docker images to our registry shell: "docker push {{docker_registry}}/{{item}}" with_items: "{{fedora_required_images}}" delegate_to: "{{ composer }}" - when: docker_pull_fedora_delegated|changed + when: docker_pull_fedora_delegated is changed - name: register origin_version_out rpm query shell: "rpm -q origin --qf '%{Version}'" @@ -607,13 +607,13 @@ shell: "docker tag {{item}}:v{{origin_version}} {{docker_registry}}/{{item}}:v{{origin_version}}" with_items: "{{openshift_required_images}}" delegate_to: "{{ composer }}" - when: docker_pull_openshift_delegated|changed + when: docker_pull_openshift_delegated is changed - name: push openshift required docker images to our registry shell: "docker push {{docker_registry}}/{{item}}:v{{origin_version}}" with_items: "{{openshift_required_images}}" delegate_to: "{{ composer }}" - when: docker_pull_openshift_delegated|changed + when: docker_pull_openshift_delegated is changed - name: create fedora image stream for OpenShift shell: "echo '{ \"apiVersion\": \"v1\", \"kind\": \"ImageStream\", \"metadata\": { \"name\": \"fedora\" }, \"spec\": { \"dockerImageRepository\": \"{{docker_registry}}/fedora\" } }' | oc create -f - && touch /etc/origin/fedoraimagestreamcreated" @@ -887,7 +887,7 @@ shell: "docker tag {{docker_registry}}/{{item}}:v{{origin_version}} {{item}}:v{{origin_version}}" with_items: "{{openshift_required_images}}" when: - - docker_pull_openshift|changed + - docker_pull_openshift is changed - env == "production" - set_fact: @@ -907,11 +907,11 @@ tasks: - name: refresh fedora image streams shell: "oc import-image fedora --all" - when: env == "staging" and hostvars[groups["osbs-masters-stg"][0]]["docker_pull_fedora"]|changed + when: env == "staging" and hostvars[groups["osbs-masters-stg"][0]]["docker_pull_fedora"] is changed - name: refresh fedora image streams shell: "oc import-image fedora --all" - when: env == "production" and hostvars[groups["osbs-masters"][0]]["docker_pull_fedora"]|changed + when: env == "production" and hostvars[groups["osbs-masters"][0]]["docker_pull_fedora"] is changed - name: enable nrpe for monitoring (noc01) iptables: action=insert chain=INPUT destination_port=5666 protocol=tcp source=10.5.126.41 state=present jump=ACCEPT diff --git a/roles/anitya/fedmsg/tasks/main.yml b/roles/anitya/fedmsg/tasks/main.yml index f4e596d2bb..adaef7e1eb 100644 --- a/roles/anitya/fedmsg/tasks/main.yml +++ b/roles/anitya/fedmsg/tasks/main.yml @@ -128,6 +128,6 @@ - name: install our custom selinux module command: semodule -i /usr/local/share/fedmsg/fedmsg.pp - when: selinux_module|changed + when: selinux_module is changed tags: - anitya/fedmsg diff --git a/roles/autocloud/backend/tasks/main.yml b/roles/autocloud/backend/tasks/main.yml index e1024c30f1..49fce7c9e0 100644 --- a/roles/autocloud/backend/tasks/main.yml +++ b/roles/autocloud/backend/tasks/main.yml @@ -112,7 +112,7 @@ - name: setup vbox if it was just installed. command: /etc/init.d/vboxdrv setup - when: virtualbox_installed|changed + when: virtualbox_installed is changed notify: - restart fedmsg-hub - restart autocloud diff --git a/roles/autocloudreporter/tasks/main.yml b/roles/autocloudreporter/tasks/main.yml index 3a40ddca6c..48dc577582 100644 --- a/roles/autocloudreporter/tasks/main.yml +++ b/roles/autocloudreporter/tasks/main.yml @@ -32,7 +32,7 @@ command: "python setup.py install" args: chdir: /root/autocloudreporter - when: "gitacr|changed" + when: "gitacr is changed" notify: - restart fedmsg-hub diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index f2613b2c65..2706c7e3e7 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -332,7 +332,7 @@ - name: install our custom selinux module command: semodule -i /usr/local/share/rsyslog/rsyslog-audit.pp - when: selinux_module|changed + when: selinux_module is changed tags: - rsyslogd - config @@ -349,7 +349,7 @@ - name: install our custom selinux module command: semodule -i /usr/local/share/mapchkpwd.pp - when: selinux_module|changed + when: selinux_module is changed tags: - selinux - config diff --git a/roles/check-compose/tasks/main.yml b/roles/check-compose/tasks/main.yml index 873ea87802..b4602a0325 100644 --- a/roles/check-compose/tasks/main.yml +++ b/roles/check-compose/tasks/main.yml @@ -61,7 +61,7 @@ command: "python setup.py install" args: chdir: /root/check-compose - when: "gitcc|changed" + when: "gitcc is changed" notify: - restart fedmsg-hub diff --git a/roles/collectd/base/tasks/main.yml b/roles/collectd/base/tasks/main.yml index 103f91ee0f..23d4427746 100644 --- a/roles/collectd/base/tasks/main.yml +++ b/roles/collectd/base/tasks/main.yml @@ -120,7 +120,7 @@ - name: install our general collectd selinux module command: semodule -i /usr/share/collectd/fi-collectd.pp - when: ficgeneral_module|changed or ficgeneral_grep|changed + when: ficgeneral_module is changed or ficgeneral_grep is changed tags: - collectd - selinux @@ -145,7 +145,7 @@ - name: install our pstorefs/collectd selinux module command: semodule -i /usr/share/collectd/fi-pstorefs.pp - when: ansible_distribution_major_version|int != 6 and (ficpstorefs_module|changed or ficpstorefs_grep|changed) + when: ansible_distribution_major_version|int != 6 and (ficpstorefs_module is changed or ficpstorefs_grep is changed) tags: - collectd - selinux diff --git a/roles/collectd/fcomm-queue/tasks/main.yml b/roles/collectd/fcomm-queue/tasks/main.yml index 2a2be81d53..f2bd7c3c9c 100644 --- a/roles/collectd/fcomm-queue/tasks/main.yml +++ b/roles/collectd/fcomm-queue/tasks/main.yml @@ -47,7 +47,7 @@ - name: install our fcomm collectd selinux module command: semodule -i /usr/share/collectd/fi-collectd-fcomm.pp - when: ficfcomm_module|changed or ficfcomm_grep|changed + when: ficfcomm_module is changed or ficfcomm_grep is changed tags: - collectd - selinux diff --git a/roles/copr/backend/tasks/main.yml b/roles/copr/backend/tasks/main.yml index 20aa967bd3..1809b6922f 100644 --- a/roles/copr/backend/tasks/main.yml +++ b/roles/copr/backend/tasks/main.yml @@ -209,4 +209,4 @@ - name: install our custom selinux module command: semodule -i /usr/local/share/copr/copr_rules.pp - when: selinux_module|changed + when: selinux_module is changed diff --git a/roles/copr/dist_git/tasks/main.yml b/roles/copr/dist_git/tasks/main.yml index 692448fc9c..82d8e8684d 100644 --- a/roles/copr/dist_git/tasks/main.yml +++ b/roles/copr/dist_git/tasks/main.yml @@ -106,7 +106,7 @@ - name: install our custom selinux policy for cgit command: semodule -i /usr/local/share/selinux/git_script_t.pp - when: cgit_selinux_module|changed + when: cgit_selinux_module is changed tags: - selinux diff --git a/roles/copr/keygen/tasks/main.yml b/roles/copr/keygen/tasks/main.yml index 3f2a900864..5a21a3ea4c 100644 --- a/roles/copr/keygen/tasks/main.yml +++ b/roles/copr/keygen/tasks/main.yml @@ -61,6 +61,6 @@ - name: install our custom selinux module command: semodule -i /usr/local/share/copr/copr_rules.pp - when: selinux_module|changed + when: selinux_module is changed - selinux: policy=targeted state=enforcing diff --git a/roles/distgit/tasks/main.yml b/roles/distgit/tasks/main.yml index 40c8a8444c..279bff2497 100644 --- a/roles/distgit/tasks/main.yml +++ b/roles/distgit/tasks/main.yml @@ -436,7 +436,7 @@ - name: install our custom selinux policy command: semodule -i /usr/local/share/selinux/upload_cgi.pp - when: selinux_module|changed + when: selinux_module is changed tags: selinux - name: copy over our custom nfs selinux policy @@ -446,7 +446,7 @@ - name: install our custom nfs selinux policy command: semodule -i /usr/local/share/selinux/cgi-nfs.pp - when: nfs_selinux_module|changed + when: nfs_selinux_module is changed tags: selinux - name: setup grokmirror for repos diff --git a/roles/fedmsg/base/tasks/main.yml b/roles/fedmsg/base/tasks/main.yml index 8153395fb0..9e2d637ff8 100644 --- a/roles/fedmsg/base/tasks/main.yml +++ b/roles/fedmsg/base/tasks/main.yml @@ -321,7 +321,7 @@ - name: install our custom selinux module command: semodule -i /usr/local/share/fedmsg/fedmsg.pp - when: selinux_module|changed + when: selinux_module is changed tags: - fedmsg/base diff --git a/roles/haproxy/tasks/main.yml b/roles/haproxy/tasks/main.yml index 15931d8c66..e8501c2a02 100644 --- a/roles/haproxy/tasks/main.yml +++ b/roles/haproxy/tasks/main.yml @@ -80,7 +80,7 @@ - name: install our general haproxy selinux module command: semodule -i /usr/share/haproxy/fi-haproxy.pp - when: fi_haproxy_module|changed or fi_haproxy_grep|changed + when: fi_haproxy_module is changed or fi_haproxy_grep is changed tags: - haproxy - selinux diff --git a/roles/hubs/tasks/db-postgresql.yml b/roles/hubs/tasks/db-postgresql.yml index aabb48a80d..229c7a318e 100644 --- a/roles/hubs/tasks/db-postgresql.yml +++ b/roles/hubs/tasks/db-postgresql.yml @@ -49,4 +49,4 @@ HUBS_CONFIG: "{{ hubs_conf_dir }}/hubs.py" become: true become_user: "{{ main_user }}" - when: db_creation|succeeded and db_creation|changed and hubs_dev_mode + when: db_creation|succeeded and db_creation is changed and hubs_dev_mode diff --git a/roles/keyserver/tasks/main.yml b/roles/keyserver/tasks/main.yml index 540d15ccbe..84db678059 100644 --- a/roles/keyserver/tasks/main.yml +++ b/roles/keyserver/tasks/main.yml @@ -96,4 +96,4 @@ - name: install our custom selinux module command: semodule -i /srv/sks/keyserver.pp - when: selinux_module|changed + when: selinux_module is changed diff --git a/roles/mirrormanager/mirrorlist2/tasks/main.yml b/roles/mirrormanager/mirrorlist2/tasks/main.yml index 97cdf08ebe..5c5ceeda3f 100644 --- a/roles/mirrormanager/mirrorlist2/tasks/main.yml +++ b/roles/mirrormanager/mirrorlist2/tasks/main.yml @@ -69,7 +69,7 @@ #- name: install our general mirrorlist2 selinux module # command: semodule -i /usr/share/mirrorlist2/mirrorlist2.pp -# when: ficgeneral_module|changed or ficgeneral_grep|changed +# when: ficgeneral_module is changed or ficgeneral_grep is changed # tags: # - mirrorlist2 # - selinux diff --git a/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml b/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml index b48b1fe656..cad3bbc8eb 100644 --- a/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml +++ b/roles/mirrormanager/mirrorlist_proxy/tasks/main.yml @@ -119,7 +119,7 @@ - name: install our custom selinux module command: semodule -i /usr/local/share/mirrorlist-logrotate/mirrorlist-logrotate.pp - when: selinux_module|changed + when: selinux_module is changed tags: - selinux - mirrorlist_proxy diff --git a/roles/nagios_client/tasks/main.yml b/roles/nagios_client/tasks/main.yml index ed0c119999..7e40d48ea1 100644 --- a/roles/nagios_client/tasks/main.yml +++ b/roles/nagios_client/tasks/main.yml @@ -75,7 +75,7 @@ - name: install our custom selinux module command: semodule -i /usr/share/nrpe/fi-nrpe.pp - when: ansible_distribution_major_version|int == 7 and selinux_module|changed + when: ansible_distribution_major_version|int == 7 and selinux_module is changed tags: - config - nagios_client @@ -92,7 +92,7 @@ - name: install our custom selinux module for mirrorlist command: semodule -i /usr/share/nrpe/mirrormanager_container.pp - when: "'proxy' in inventory_hostname and selinux_module|changed" + when: "'proxy' in inventory_hostname and selinux_module is changed" tags: - config - nagios_client diff --git a/roles/nagios_server/tasks/main.yml b/roles/nagios_server/tasks/main.yml index a110f2aa09..fd220a0c14 100644 --- a/roles/nagios_server/tasks/main.yml +++ b/roles/nagios_server/tasks/main.yml @@ -466,6 +466,6 @@ - name: Install our custom selinux module command: semodule -i /usr/local/share/nagios-policy/nagios_hostname.pp - when: selinux_module|changed + when: selinux_module is changed tags: - nagios_server diff --git a/roles/openqa/dispatcher/tasks/main.yml b/roles/openqa/dispatcher/tasks/main.yml index 205f529c53..7cf92a2e63 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -103,7 +103,7 @@ command: "python setup.py install" args: chdir: /root/fedora_openqa - when: "gittools|changed or not insttools.stat.exists" + when: "gittools is changed or not insttools.stat.exists" notify: - restart fedmsg-hub diff --git a/roles/openqa/server/tasks/main.yml b/roles/openqa/server/tasks/main.yml index 8f1078e01d..35179a13e8 100644 --- a/roles/openqa/server/tasks/main.yml +++ b/roles/openqa/server/tasks/main.yml @@ -239,7 +239,7 @@ # services is undefined in check mode - name: Wait for openQA to be fully started pause: seconds=5 - when: "services is defined and services|changed" + when: "services is defined and services is changed" # the 'dispatcher' role requires this to be root.fedmsg 0640. so we # don't enforce ownership here and set mode to 0640 so we don't wind @@ -257,7 +257,7 @@ - name: Dump existing config for checking changes shell: "/usr/share/openqa/script/dump_templates --json > /tmp/tmpl-old.json" - when: "(gittests is defined) and (gittests|changed)" + when: "(gittests is defined) and (gittests is changed)" changed_when: "1 != 1" # Because of the boring details of how template loading works, getting @@ -266,17 +266,17 @@ # the *following* step will register as changed. - name: Load main tests command: "/var/lib/openqa/share/tests/fedora/templates --clean" - when: "(gittests is defined) and (gittests|changed)" + when: "(gittests is defined) and (gittests is changed)" changed_when: "1 != 1" - name: Load update tests command: "/var/lib/openqa/share/tests/fedora/templates-updates --update" - when: "(gittests is defined) and (gittests|changed)" + when: "(gittests is defined) and (gittests is changed)" changed_when: "1 != 1" - name: Check if the tests changed in previous step shell: "/usr/share/openqa/script/dump_templates --json > /tmp/tmpl-new.json && json_diff /tmp/tmpl-old.json /tmp/tmpl-new.json" - when: "(gittests is defined) and (gittests|changed)" + when: "(gittests is defined) and (gittests is changed)" register: testsdiff changed_when: "testsdiff.rc > 0" failed_when: "1 != 1" diff --git a/roles/openqa/worker/tasks/main.yml b/roles/openqa/worker/tasks/main.yml index 41c58964ed..c27ea31c22 100644 --- a/roles/openqa/worker/tasks/main.yml +++ b/roles/openqa/worker/tasks/main.yml @@ -50,7 +50,7 @@ - name: Do systemctl daemon-reload to register new service (ppc64 only) command: "systemctl daemon-reload" - when: "prepservice is defined and prepservice|changed" + when: "prepservice is defined and prepservice is changed" - name: Enable systemd service to run boot script (ppc64 only) service: name=openqa-ppc64-prep enabled=yes state=started diff --git a/roles/pagure/fedmsg/tasks/main.yml b/roles/pagure/fedmsg/tasks/main.yml index 2fd69fe20c..dcc89e64ff 100644 --- a/roles/pagure/fedmsg/tasks/main.yml +++ b/roles/pagure/fedmsg/tasks/main.yml @@ -142,7 +142,7 @@ - name: install our custom selinux module command: semodule -i /usr/local/share/fedmsg/fedmsg.pp - when: selinux_module|changed + when: selinux_module is changed tags: - selinux - pagure diff --git a/roles/pagure/frontend/tasks/main.yml b/roles/pagure/frontend/tasks/main.yml index 21b3c12de7..4f87dcdc25 100644 --- a/roles/pagure/frontend/tasks/main.yml +++ b/roles/pagure/frontend/tasks/main.yml @@ -345,7 +345,7 @@ - name: install our custom selinux module command: semodule -i /usr/local/share/pagure.pp - when: selinux_module|changed + when: selinux_module is changed tags: - pagure diff --git a/roles/pagure/upstreamfirst-frontend/tasks/main.yml b/roles/pagure/upstreamfirst-frontend/tasks/main.yml index 3d11c3141b..8ed1636fb9 100644 --- a/roles/pagure/upstreamfirst-frontend/tasks/main.yml +++ b/roles/pagure/upstreamfirst-frontend/tasks/main.yml @@ -289,7 +289,7 @@ - name: install our custom selinux module command: semodule -i /usr/local/share/pagure.pp - when: selinux_module|changed + when: selinux_module is changed tags: - pagure diff --git a/roles/relvalconsumer/tasks/main.yml b/roles/relvalconsumer/tasks/main.yml index 3e7e03930c..199ea75720 100644 --- a/roles/relvalconsumer/tasks/main.yml +++ b/roles/relvalconsumer/tasks/main.yml @@ -88,7 +88,7 @@ command: "python setup.py install" args: chdir: /root/relvalconsumer - when: "gitrvc|changed" + when: "gitrvc is changed" notify: - restart fedmsg-hub diff --git a/tasks/persistent_cloud.yml b/tasks/persistent_cloud.yml index c1b36483bf..f9ff151d6f 100644 --- a/tasks/persistent_cloud.yml +++ b/tasks/persistent_cloud.yml @@ -91,7 +91,7 @@ - name: install python2 and dnf stuff raw: dnf -y install python-dnf libselinux-python - when: facts|failed + when: facts is failed # TODO - somehow guess when keypair is finally deployed and return little bit earlier ## We need to specify user, here we trying with fedora or root