aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles
diff options
context:
space:
mode:
authorStepan Andrushko <stepanx.andrushko@intel.com>2018-11-15 23:14:33 +0200
committerStepan Andrushko <stepanx.andrushko@intel.com>2018-12-13 18:34:53 +0200
commit0d6c251582f2fd19980c5d73d6a412a3b8fede64 (patch)
tree1fb88c9641447a4ca35446c3051f89d9766ebf3d /ansible/roles
parent24700ec3606ca422708646d60fb346d2e0d103cc (diff)
Update#2: Trex KPI not collected no rabbitmq user
Changed the way how rabbitmq user is created. For baremetal it is done using NSB installation script. For Yardstick installed in container supervisor is updated with user name/password. JIRA: YARDSTICK-1479 Change-Id: I4f42ab8d5ef1735b0416ed26d04e259efa155543 Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/configure_rabbitmq/tasks/main.yml20
-rw-r--r--ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j25
-rw-r--r--ansible/roles/configure_rabbitmq/templates/user_definitions.json.j223
3 files changed, 8 insertions, 40 deletions
diff --git a/ansible/roles/configure_rabbitmq/tasks/main.yml b/ansible/roles/configure_rabbitmq/tasks/main.yml
index 4ff4222dc..3ad60c1ea 100644
--- a/ansible/roles/configure_rabbitmq/tasks/main.yml
+++ b/ansible/roles/configure_rabbitmq/tasks/main.yml
@@ -12,16 +12,6 @@
# 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
-
- name: Restart rabbitmq
service:
name: rabbitmq-server
@@ -30,5 +20,11 @@
- name: rabbitmqctl start_app
shell: rabbitmqctl start_app
-- name: Enable management plugin
- shell: rabbitmq-plugins enable rabbitmq_management
+- name: Configure rabbitmq
+ rabbitmq_user:
+ user: yardstick
+ password: yardstick
+ configure_priv: .*
+ read_priv: .*
+ write_priv: .*
+ state: present
diff --git a/ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2 b/ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2
deleted file mode 100644
index 8f07edf5c..000000000
--- a/ansible/roles/configure_rabbitmq/templates/rabbitmq.config.j2
+++ /dev/null
@@ -1,5 +0,0 @@
- [
- {rabbitmq_management, [
- {load_definitions, "/etc/rabbitmq/definitions.json"}
- ]}
-]. \ No newline at end of file
diff --git a/ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2 b/ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2
deleted file mode 100644
index 7c811f16d..000000000
--- a/ansible/roles/configure_rabbitmq/templates/user_definitions.json.j2
+++ /dev/null
@@ -1,23 +0,0 @@
- {
- "users": [{
- "name": "yardstick",
- "password_hash": "XHp9fBOE3vjTEf7ktiUBHqefW2g=",
- "hashing_algorithm": "rabbit_password_hashing_sha256",
- "tags": ""
- }],
- "vhosts": [{
- "name": "/"
- }],
- "permissions": [{
- "user": "yardstick",
- "vhost": "/",
- "configure": ".*",
- "write": ".*",
- "read": ".*"
- }],
- "parameters": [],
- "policies": [],
- "queues": [],
- "exchanges": [],
- "bindings": []
-}