aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/configure_rabbitmq/tasks
diff options
context:
space:
mode:
authorStepan Andrushko <stepanx.andrushko@intel.com>2019-02-19 19:14:55 +0200
committerStepan Andrushko <stepanx.andrushko@intel.com>2019-02-20 15:16:21 +0200
commit38c458e35a181e9cced957d733832c1e297e2e35 (patch)
tree6b060c6ea4b7793f28e82135725ee7b3f572da77 /ansible/roles/configure_rabbitmq/tasks
parent88c5dda9712afc71742b164905f21cfff45926fa (diff)
Yardstick container rabbitmq supervisor RUN state
Rabbitmq process exited supervisor and couldn't respawn it afterwards. Updated the way rabbitmq service and node are spawned to have them RUNNING after a service stop or node down. JIRA: YARDSTICK-1600 Change-Id: Idd6812db7a1985e8c727efd7ea45572199c1a4a9 Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
Diffstat (limited to 'ansible/roles/configure_rabbitmq/tasks')
-rw-r--r--ansible/roles/configure_rabbitmq/tasks/main.yml37
1 files changed, 23 insertions, 14 deletions
diff --git a/ansible/roles/configure_rabbitmq/tasks/main.yml b/ansible/roles/configure_rabbitmq/tasks/main.yml
index 3ad60c1ea..59998abc0 100644
--- a/ansible/roles/configure_rabbitmq/tasks/main.yml
+++ b/ansible/roles/configure_rabbitmq/tasks/main.yml
@@ -12,19 +12,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
-- name: Restart rabbitmq
- service:
- name: rabbitmq-server
- state: restarted
+- block:
+ - 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
+ - name: Configure rabbitmq
+ rabbitmq_user:
+ user: yardstick
+ password: yardstick
+ configure_priv: .*
+ read_priv: .*
+ write_priv: .*
+ state: present
+ when: install_mode == inst_mode_baremetal
+
+- name: Create rabbitmq file for supervisor
+ template:
+ src: rabbitmq.sh.j2
+ dest: /etc/yardstick/rabbitmq.sh
+ mode: 0755
+ when: install_mode == inst_mode_container