From c536ed54bb0ce2031863cbfe0668a4afd0040d8e Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Tue, 22 Mar 2016 21:25:16 +0000 Subject: [PATCH] Remove the database creation & messaging tasks from the role This change removes the database creation and messaging tasks from this role as the role should expect to be given a database and message queue. These tasks will be added in a subsequent patch which implements a set of testing playbooks. Change-Id: I2a26b2178b0245c5f72dbec201e2191fe4e6543e --- tasks/ironic_db_setup.yml | 30 +------------------------- tasks/ironic_messaging_setup.yml | 37 -------------------------------- tasks/ironic_pre_install.yml | 4 ---- 3 files changed, 1 insertion(+), 70 deletions(-) delete mode 100644 tasks/ironic_messaging_setup.yml diff --git a/tasks/ironic_db_setup.yml b/tasks/ironic_db_setup.yml index bec5aab6..91532935 100644 --- a/tasks/ironic_db_setup.yml +++ b/tasks/ironic_db_setup.yml @@ -13,36 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: Create database for ironic - mysql_db: - login_user: "{{ galera_root_user }}" - login_password: "{{ galera_root_password }}" - login_host: "{{ ironic_galera_address }}" - name: "{{ ironic_galera_database }}" - state: "present" - register: ironic_db - tags: - - ironic-db-setup - -- name: Grant access to the DB - mysql_user: - login_user: "{{ galera_root_user }}" - login_password: "{{ galera_root_password }}" - login_host: "{{ ironic_galera_address }}" - name: "{{ ironic_galera_user }}" - password: "{{ ironic_galera_password }}" - host: "{{ item }}" - state: "present" - priv: "{{ ironic_galera_database }}.*:ALL" - with_items: - - "localhost" - - "{{ ironic_galera_address }}" - - "%" - tags: - - ironic-db-setup - - name: Update database schema - command: "{{ ironic_bin }}/ironic-dbsync --config-file /etc/ironic/ironic.conf upgrade" + command: "{{ ironic_bin }}/ironic-dbsync upgrade" become: yes become_user: "{{ ironic_system_user_name }}" notify: diff --git a/tasks/ironic_messaging_setup.yml b/tasks/ironic_messaging_setup.yml deleted file mode 100644 index a45e49dd..00000000 --- a/tasks/ironic_messaging_setup.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# Copyright 2014, Rackspace US, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -- name: Ensure Rabbitmq vhost - rabbitmq_vhost: - name: "{{ ironic_rabbitmq_vhost }}" - state: "present" - delegate_to: "{{ groups['rabbitmq_all'][0] }}" - tags: - - ironic-rabbitmq - - ironic-rabbitmq-vhost - -- name: Ensure rabbitmq user - rabbitmq_user: - user: "{{ ironic_rabbitmq_userid }}" - password: "{{ ironic_rabbitmq_password }}" - vhost: "{{ ironic_rabbitmq_vhost }}" - configure_priv: ".*" - read_priv: ".*" - write_priv: ".*" - state: "present" - delegate_to: "{{ groups['rabbitmq_all'][0] }}" - tags: - - ironic-rabbitmq - - ironic-rabbitmq-user diff --git a/tasks/ironic_pre_install.yml b/tasks/ironic_pre_install.yml index 23255825..3f641c2c 100644 --- a/tasks/ironic_pre_install.yml +++ b/tasks/ironic_pre_install.yml @@ -139,7 +139,3 @@ - ironic-install - ironic-apt-packages -- include: ironic_messaging_setup.yml - when: > - inventory_hostname == groups['ironic_all'][0] -