add yardstick iruya 9.0.0 release notes
[yardstick.git] / ansible / roles / configure_rabbitmq / tasks / main.yml
index 4ff4222..59998ab 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 ---
-- name: Create rabbitmq configuration
-  template:
-    src: rabbitmq.config.j2
-    dest: /etc/rabbitmq/rabbitmq.config
-
-- name: Define user definitions file
-  template:
-    src: user_definitions.json.j2
-    dest: /etc/rabbitmq/definitions.json
+- block:
+  - name: Restart rabbitmq
+    service:
+      name: rabbitmq-server
+      state: restarted
 
-- name: Restart rabbitmq
-  service:
-    name: rabbitmq-server
-    state: restarted
+  - name: rabbitmqctl start_app
+    shell: rabbitmqctl start_app
 
-- name: rabbitmqctl start_app
-  shell: rabbitmqctl start_app
+  - name: Configure rabbitmq
+    rabbitmq_user:
+      user: yardstick
+      password: yardstick
+      configure_priv: .*
+      read_priv: .*
+      write_priv: .*
+      state: present
+  when: install_mode == inst_mode_baremetal
 
-- name: Enable management plugin
-  shell: rabbitmq-plugins enable rabbitmq_management
+- name: Create rabbitmq file for supervisor
+  template:
+    src: rabbitmq.sh.j2
+    dest: /etc/yardstick/rabbitmq.sh
+    mode: 0755
+  when: install_mode == inst_mode_container