shell:
cmd: kubectl get pods rabbitmq-0
register: result
- ignore_errors: true
+ ignore_errors: yes
+ no_log: True
-- name: copy common folder to host
+- debug:
+ msg: Rabbitmq is already present
+ when: result.rc == 0
+
+- name: copy common folder to host for rabbitmg installation
copy:
src: common
dest: /tmp/rabbitmq/
when: result is failed
-- name: Install common
+- name: Install common for rabbitmg installation
shell:
cmd: kubectl apply -f /tmp/rabbitmq/common
when: result is failed
-- name: copy statefulset_x86.yaml to host
+- name: copy statefulset_x86.yaml to host for rabbitmg installation
copy:
src: statefulset_x86.yaml
dest: /tmp/rabbitmq/
cmd: kubectl apply -f /tmp/rabbitmq/statefulset_x86.yaml
when: result is failed and ansible_architecture == 'x86_64'
-- name: copy statefulset_arm.yaml to host
+- name: copy statefulset_arm.yaml to host for rabbitmg installation
copy:
src: statefulset_arm.yaml
dest: /tmp/rabbitmq/