Fix all uses of the old action: in playbooks.
This commit is contained in:
parent
4cafc2bd37
commit
5c0cca432b
7 changed files with 21 additions and 31 deletions
|
@ -18,10 +18,8 @@
|
||||||
pause: seconds=30 prompt="Destroying vm now {{ target }}, abort if this is wrong"
|
pause: seconds=30 prompt="Destroying vm now {{ target }}, abort if this is wrong"
|
||||||
|
|
||||||
- name: find the instance id from the builder
|
- 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
|
register: instanceid
|
||||||
|
|
||||||
- name: destroy the vm
|
- name: destroy the vm
|
||||||
action: command /usr/sbin/halt -p
|
command: /usr/sbin/halt -p
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,11 +28,11 @@
|
||||||
pause: seconds=30 prompt="Destroying (and lvremove for) vm now {{ target }}, abort if this is wrong"
|
pause: seconds=30 prompt="Destroying (and lvremove for) vm now {{ target }}, abort if this is wrong"
|
||||||
|
|
||||||
- name: destroy the vm
|
- name: destroy the vm
|
||||||
action: virt name={{ inventory_hostname }} command=destroy
|
virt: name={{ inventory_hostname }} command=destroy
|
||||||
delegate_to: "{{ vmhost }}"
|
delegate_to: "{{ vmhost }}"
|
||||||
|
|
||||||
- name: undefine the vm
|
- name: undefine the vm
|
||||||
action: virt name={{ inventory_hostname }} command=undefine
|
virt: name={{ inventory_hostname }} command=undefine
|
||||||
delegate_to: "{{ vmhost }}"
|
delegate_to: "{{ vmhost }}"
|
||||||
|
|
||||||
- name: destroy the lv
|
- name: destroy the lv
|
||||||
|
|
|
@ -25,16 +25,8 @@
|
||||||
# this is how you include other task lists
|
# this is how you include other task lists
|
||||||
- include: "{{ tasks }}/motd.yml"
|
- 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)
|
- name: install packager tools (dnf)
|
||||||
action: dnf state=present pkg={{ item }}
|
dnf: state=present pkg={{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- fedora-packager
|
- fedora-packager
|
||||||
when: ansible_distribution_major_version|int > 21
|
when: ansible_distribution_major_version|int > 21
|
||||||
|
|
|
@ -48,10 +48,10 @@
|
||||||
- include: "{{ tasks }}/motd.yml"
|
- include: "{{ tasks }}/motd.yml"
|
||||||
when: env != "staging"
|
when: env != "staging"
|
||||||
- name: put in script for syncing
|
- 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'
|
when: datacenter == 'ibiblio'
|
||||||
- name: put in cron job for syncing
|
- 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'
|
when: datacenter == 'ibiblio'
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
tags:
|
tags:
|
||||||
- rootpw
|
- rootpw
|
||||||
- name: Set the hostname
|
- name: Set the hostname
|
||||||
action: hostname name={{ controller_hostname }}
|
hostname: name={{ controller_hostname }}
|
||||||
|
|
||||||
- name: Deploy root private SSH key
|
- 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
|
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') }}"
|
- authorized_key: user=root key="{{ lookup('file', files + '/fedora-cloud/fed09-ssh-key.pub') }}"
|
||||||
|
|
||||||
- name: install core pkgs
|
- name: install core pkgs
|
||||||
action: yum state=present pkg={{ item }}
|
yum: state=present pkg={{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- libselinux-python
|
- libselinux-python
|
||||||
- ntp
|
- ntp
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
- iptables-services
|
- iptables-services
|
||||||
|
|
||||||
- name: disable selinux
|
- name: disable selinux
|
||||||
action: selinux policy=targeted state=permissive
|
selinux: policy=targeted state=permissive
|
||||||
|
|
||||||
- service: name=tgtd state=started enabled=yes
|
- 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
|
#- yum: state=present name=/root/openstack-utils-2014.2-1.el7.centos.noarch.rpm
|
||||||
|
|
||||||
- name: install basic openstack packages
|
- name: install basic openstack packages
|
||||||
action: yum state=present name={{ item }}
|
yum: state=present name={{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- openstack-utils
|
- openstack-utils
|
||||||
- openstack-selinux
|
- openstack-selinux
|
||||||
|
@ -186,7 +186,7 @@
|
||||||
- haproxy
|
- haproxy
|
||||||
|
|
||||||
- name: install etckeeper
|
- name: install etckeeper
|
||||||
action: yum state=present name=etckeeper
|
yum: state=present name=etckeeper
|
||||||
- name: init etckeeper
|
- name: init etckeeper
|
||||||
shell: cd /etc && etckeeper init
|
shell: cd /etc && etckeeper init
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@
|
||||||
|
|
||||||
# http://docs.openstack.org/trunk/install-guide/install/yum/content/basics-database-controller.html
|
# http://docs.openstack.org/trunk/install-guide/install/yum/content/basics-database-controller.html
|
||||||
- name: install mysql packages
|
- name: install mysql packages
|
||||||
action: yum state=present pkg={{ item }}
|
yum: state=present pkg={{ item }}
|
||||||
with_items:
|
with_items:
|
||||||
- mariadb-galera-server
|
- mariadb-galera-server
|
||||||
- MySQL-python
|
- MySQL-python
|
||||||
|
@ -241,11 +241,11 @@
|
||||||
- name: copy .my.cnf file with root password credentials
|
- name: copy .my.cnf file with root password credentials
|
||||||
template: src={{ files }}/fedora-cloud/my.cnf dest=/root/.my.cnf owner=root mode=0600
|
template: src={{ files }}/fedora-cloud/my.cnf dest=/root/.my.cnf owner=root mode=0600
|
||||||
- name: delete anonymous MySQL server user for $server_hostname
|
- 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
|
- 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
|
- 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
|
# WORKAROUNDS - already reported to OpenStack team
|
||||||
- lineinfile:
|
- lineinfile:
|
||||||
|
@ -258,7 +258,7 @@
|
||||||
regexp="RABBITMQ_NODE_PORT"
|
regexp="RABBITMQ_NODE_PORT"
|
||||||
line=" 'RABBITMQ_NODE_PORTTTTT' => $port,"
|
line=" 'RABBITMQ_NODE_PORTTTTT' => $port,"
|
||||||
backup=yes
|
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
|
- ini_file: dest=/usr/lib/systemd/system/mongod.service section=Service option=PIDFile value=/var/run/mongodb/mongod.pid
|
||||||
- lineinfile:
|
- lineinfile:
|
||||||
dest=/usr/lib/python2.7/site-packages/packstack/puppet/templates/mongodb.pp
|
dest=/usr/lib/python2.7/site-packages/packstack/puppet/templates/mongodb.pp
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: add infrastructure repo
|
- 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:
|
with_items:
|
||||||
- infrastructure.repo
|
- infrastructure.repo
|
||||||
- infrastructure-testing.repo
|
- infrastructure-testing.repo
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: get list of guests
|
- name: get list of guests
|
||||||
action: virt command=list_vms
|
virt: command=list_vms
|
||||||
register: vmlist
|
register: vmlist
|
||||||
|
|
||||||
- name: add them to myvms_new group
|
- name: add them to myvms_new group
|
||||||
|
@ -40,11 +40,11 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: tell nagios to shush
|
- 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
|
delegate_to: noc01.phx2.fedoraproject.org
|
||||||
|
|
||||||
- name: echo-y
|
- name: echo-y
|
||||||
action: command /sbin/halt -p
|
command: /sbin/halt -p
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
# if one of them is down we don't care
|
# if one of them is down we don't care
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue