first cut at changing all the old |changed to is changed per ansible deprecations

This commit is contained in:
Kevin Fenzi 2018-05-07 23:51:48 +00:00
parent 56123c0d24
commit a8714caab3
28 changed files with 42 additions and 42 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -32,7 +32,7 @@
command: "python setup.py install"
args:
chdir: /root/autocloudreporter
when: "gitacr|changed"
when: "gitacr is changed"
notify:
- restart fedmsg-hub

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -88,7 +88,7 @@
command: "python setup.py install"
args:
chdir: /root/relvalconsumer
when: "gitrvc|changed"
when: "gitrvc is changed"
notify:
- restart fedmsg-hub

View file

@ -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