From 5c0cca432b56ca34eeb9e87c3df92f52da87576b Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 6 Jan 2016 21:33:14 +0000 Subject: [PATCH] Fix all uses of the old action: in playbooks. --- playbooks/destroy_cloud_inst.yml | 6 ++---- playbooks/destroy_virt_inst.yml | 4 ++-- playbooks/groups/arm-packager.yml | 10 +--------- playbooks/groups/download.yml | 4 ++-- .../fed-cloud09.cloud.fedoraproject.org.yml | 20 +++++++++---------- .../hosts/testdays.fedorainfracloud.org.yml | 2 +- playbooks/vhost_halt_guests.yml | 6 +++--- 7 files changed, 21 insertions(+), 31 deletions(-) diff --git a/playbooks/destroy_cloud_inst.yml b/playbooks/destroy_cloud_inst.yml index a36103441e..91e5b97a86 100644 --- a/playbooks/destroy_cloud_inst.yml +++ b/playbooks/destroy_cloud_inst.yml @@ -18,10 +18,8 @@ pause: seconds=30 prompt="Destroying vm now {{ target }}, abort if this is wrong" - name: find the instance id from the builder - action: command curl -s http://169.254.169.254/latest/meta-data/instance-id + command: curl -s http://169.254.169.254/latest/meta-data/instance-id register: instanceid - name: destroy the vm - action: command /usr/sbin/halt -p - - + command: /usr/sbin/halt -p diff --git a/playbooks/destroy_virt_inst.yml b/playbooks/destroy_virt_inst.yml index d42871c0b6..096876f9bf 100644 --- a/playbooks/destroy_virt_inst.yml +++ b/playbooks/destroy_virt_inst.yml @@ -28,11 +28,11 @@ pause: seconds=30 prompt="Destroying (and lvremove for) vm now {{ target }}, abort if this is wrong" - name: destroy the vm - action: virt name={{ inventory_hostname }} command=destroy + virt: name={{ inventory_hostname }} command=destroy delegate_to: "{{ vmhost }}" - name: undefine the vm - action: virt name={{ inventory_hostname }} command=undefine + virt: name={{ inventory_hostname }} command=undefine delegate_to: "{{ vmhost }}" - name: destroy the lv diff --git a/playbooks/groups/arm-packager.yml b/playbooks/groups/arm-packager.yml index 74265d1440..7934373441 100644 --- a/playbooks/groups/arm-packager.yml +++ b/playbooks/groups/arm-packager.yml @@ -25,16 +25,8 @@ # this is how you include other task lists - include: "{{ tasks }}/motd.yml" - - name: install packager tools (yum) - action: yum state=present pkg={{ item }} - with_items: - - fedora-packager - when: ansible_distribution_major_version|int < 22 - tags: - - packages - - name: install packager tools (dnf) - action: dnf state=present pkg={{ item }} + dnf: state=present pkg={{ item }} with_items: - fedora-packager when: ansible_distribution_major_version|int > 21 diff --git a/playbooks/groups/download.yml b/playbooks/groups/download.yml index e235df1420..b035a69da7 100644 --- a/playbooks/groups/download.yml +++ b/playbooks/groups/download.yml @@ -48,10 +48,10 @@ - include: "{{ tasks }}/motd.yml" when: env != "staging" - name: put in script for syncing - action: copy src="{{ files }}/download/sync-up-downloads.sh" dest=/usr/local/bin/sync-up-downloads owner=root group=root mode=755 + copy: src="{{ files }}/download/sync-up-downloads.sh" dest=/usr/local/bin/sync-up-downloads owner=root group=root mode=755 when: datacenter == 'ibiblio' - name: put in cron job for syncing - action: copy src="{{ files }}/download/download-sync.cron" dest=/etc/cron.d/download-sync owner=root group=root mode=644 + copy: src="{{ files }}/download/download-sync.cron" dest=/etc/cron.d/download-sync owner=root group=root mode=644 when: datacenter == 'ibiblio' handlers: diff --git a/playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml b/playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml index 12f6efe24c..9dad3ab7c7 100644 --- a/playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml +++ b/playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml @@ -59,7 +59,7 @@ tags: - rootpw - name: Set the hostname - action: hostname name={{ controller_hostname }} + hostname: name={{ controller_hostname }} - name: Deploy root private SSH key copy: src={{ private }}/files/openstack/fed-cloud09-root.key dest=/root/.ssh/id_rsa mode=600 owner=root group=root @@ -68,7 +68,7 @@ - authorized_key: user=root key="{{ lookup('file', files + '/fedora-cloud/fed09-ssh-key.pub') }}" - name: install core pkgs - action: yum state=present pkg={{ item }} + yum: state=present pkg={{ item }} with_items: - libselinux-python - ntp @@ -78,7 +78,7 @@ - iptables-services - name: disable selinux - action: selinux policy=targeted state=permissive + selinux: policy=targeted state=permissive - service: name=tgtd state=started enabled=yes @@ -172,7 +172,7 @@ #- yum: state=present name=/root/openstack-utils-2014.2-1.el7.centos.noarch.rpm - name: install basic openstack packages - action: yum state=present name={{ item }} + yum: state=present name={{ item }} with_items: - openstack-utils - openstack-selinux @@ -186,7 +186,7 @@ - haproxy - name: install etckeeper - action: yum state=present name=etckeeper + yum: state=present name=etckeeper - name: init etckeeper shell: cd /etc && etckeeper init @@ -216,7 +216,7 @@ # http://docs.openstack.org/trunk/install-guide/install/yum/content/basics-database-controller.html - name: install mysql packages - action: yum state=present pkg={{ item }} + yum: state=present pkg={{ item }} with_items: - mariadb-galera-server - MySQL-python @@ -241,11 +241,11 @@ - name: copy .my.cnf file with root password credentials template: src={{ files }}/fedora-cloud/my.cnf dest=/root/.my.cnf owner=root mode=0600 - name: delete anonymous MySQL server user for $server_hostname - action: mysql_user user="" host="{{ controller_public_ip }}" state="absent" + mysql_user: user="" host="{{ controller_public_ip }}" state="absent" - name: delete anonymous MySQL server user for localhost - action: mysql_user user="" state="absent" + mysql_user: user="" state="absent" - name: remove the MySQL test database - action: mysql_db db=test state=absent + mysql_db: db=test state=absent # WORKAROUNDS - already reported to OpenStack team - lineinfile: @@ -258,7 +258,7 @@ regexp="RABBITMQ_NODE_PORT" line=" 'RABBITMQ_NODE_PORTTTTT' => $port," backup=yes - - action: yum state=present pkg=mongodb-server + - yum: state=present pkg=mongodb-server - ini_file: dest=/usr/lib/systemd/system/mongod.service section=Service option=PIDFile value=/var/run/mongodb/mongod.pid - lineinfile: dest=/usr/lib/python2.7/site-packages/packstack/puppet/templates/mongodb.pp diff --git a/playbooks/hosts/testdays.fedorainfracloud.org.yml b/playbooks/hosts/testdays.fedorainfracloud.org.yml index 19edca2286..eecca9f556 100644 --- a/playbooks/hosts/testdays.fedorainfracloud.org.yml +++ b/playbooks/hosts/testdays.fedorainfracloud.org.yml @@ -28,7 +28,7 @@ tasks: - name: add infrastructure repo - action: copy src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}" + copy: src="{{ files }}/common/{{ item }}" dest="/etc/yum.repos.d/{{ item }}" with_items: - infrastructure.repo - infrastructure-testing.repo diff --git a/playbooks/vhost_halt_guests.yml b/playbooks/vhost_halt_guests.yml index d888b6d8c9..083147c358 100644 --- a/playbooks/vhost_halt_guests.yml +++ b/playbooks/vhost_halt_guests.yml @@ -25,7 +25,7 @@ tasks: - name: get list of guests - action: virt command=list_vms + virt: command=list_vms register: vmlist - name: add them to myvms_new group @@ -40,11 +40,11 @@ tasks: - name: tell nagios to shush - action: nagios action=silence host={{ inventory_hostname_short }} + nagios: action=silence host={{ inventory_hostname_short }} delegate_to: noc01.phx2.fedoraproject.org - name: echo-y - action: command /sbin/halt -p + command: /sbin/halt -p ignore_errors: true # if one of them is down we don't care