Commit 2d630346 authored by EKbfh's avatar EKbfh 🐼
Browse files

Merge branch 'EKbfh-master-patch-27077' into 'master'

Fix ansible changed_when

See merge request !5748

(cherry picked from commit 0671f995)

668cf2e2 Update ansible/system_roles/consul/tasks/main.yml
84188716 Update ansible/system_roles/consul/tasks/main.yml
115723a0 Update ansible/system_roles/mongod/tasks/main.yml
c4710d07 Fix change_when error in ansible 2.9.14+

(cherry picked from commit 10342b02)
parent 114a9c15
Pipeline #34156 passed with stages
in 61 minutes and 29 seconds
......@@ -55,7 +55,7 @@
chdir: "{{ noc_root }}"
become: "True"
become_user: "{{ noc_user }}"
changed_when: "False"
changed_when: false
- name: Apply pools
command: "{{ noc_root }}/scripts/deploy/apply-pools"
......
......@@ -3,7 +3,7 @@
- name: check if supervisord running
command: pgrep -f supervisord -c
failed_when: "False"
changed_when: "False"
changed_when: false
register: supervisord_running
check_mode: "False"
......@@ -17,7 +17,7 @@
- name: check if noc services are down
shell: /opt/noc/noc ctl status | grep -v RUNNING
become: "True"
changed_when: "False"
changed_when: false
register: noc_status
failed_when: "False"
check_mode: "False"
......
......@@ -3,7 +3,7 @@
- name: check if noc running
command: "{{ noc_root }}/noc ctl status"
check_mode: "False"
changed_when: "False"
changed_when: false
register: noc_ctl_status
when: tower_serial_restart_noc
......@@ -17,7 +17,7 @@
- name: Serial NOC restart
command: "{{ noc_root }}/noc ctl serialrestart all"
when: tower_serial_restart_noc
changed_when: "False"
changed_when: false
- name: Restart NOC node
service:
......
......@@ -41,7 +41,7 @@
state: stopped
become: "True"
failed_when: "False"
changed_when: "False"
changed_when: false
when: tower_stop_noc
- name: Setup hostname
......
......@@ -28,7 +28,7 @@
command: grep -q sse4_2 /proc/cpuinfo
register: sse42_support
failed_when: "False"
changed_when: "False"
changed_when: false
check_mode: "False"
- name: fail if SSE 4.2 not supported
......@@ -47,7 +47,7 @@
command: grep -q SSE4.2 /var/run/dmesg.boot
register: sse42_support
failed_when: "False"
changed_when: "False"
changed_when: false
check_mode: "False"
- name: fail if SSE 4.2 not supported
......
......@@ -3,7 +3,7 @@
- name: check if clickhouse-server running
command: pgrep -f clickhouse-server -c
failed_when: "False"
changed_when: "False"
changed_when: false
register: clickhouse_server_running
check_mode: "False"
......
......@@ -17,7 +17,7 @@
delegate_to: 127.0.0.1
become: "False"
run_once: "True"
changed_when: "False"
changed_when: false
- name: Download Consul-template
get_url:
......
......@@ -3,7 +3,7 @@
- name: check if consul_template running
command: pgrep -x consul-template -c
failed_when: "False"
changed_when: "False"
changed_when: false
register: consul_template_running
check_mode: "False"
......
......@@ -17,7 +17,7 @@
delegate_to: 127.0.0.1
become: "False"
run_once: "True"
changed_when: "False"
changed_when: false
- name: Download Consul
get_url:
......
......@@ -2,7 +2,7 @@
# File: main.yml - Main tasks for Consul
- name: make servers group
changed_when: "False"
changed_when: false
add_host:
group: svc-consul-server
host: "{{ item }}"
......
......@@ -28,7 +28,7 @@
name: firewalld
check_mode: "True"
register: firewalld_state
changed_when: "False"
changed_when: false
ignore_errors: "True"
tags:
- config
......
......@@ -28,7 +28,7 @@
name: firewalld
check_mode: "True"
register: firewalld_state
changed_when: "False"
changed_when: false
ignore_errors: "True"
tags:
- config
......
......@@ -13,7 +13,7 @@
environment:
ANSIBLE_JINJA2_NATIVE: true
register: consul_key_response
changed_when: "False"
changed_when: false
check_mode: "False"
# if default value is unset provide default json
......
......@@ -3,7 +3,7 @@
- name: check if consul running
command: pgrep -x consul -c
failed_when: "False"
changed_when: "False"
changed_when: false
register: consul_running
check_mode: "False"
......@@ -26,7 +26,7 @@
uri:
url: "http://127.0.0.1:8500/v1/health/node/{{ host }}/"
register: consul_ping
changed_when: "False"
changed_when: false
check_mode: "False"
loop_control:
loop_var: host
......
......@@ -3,7 +3,7 @@
- name: check if grafana running
command: pgrep -x grafana-server -c
failed_when: "False"
changed_when: "False"
changed_when: false
register: grafana_running
check_mode: "False"
......@@ -35,7 +35,7 @@
url: "http://127.0.0.1:8500/v1/health/service/grafana"
return_content: "True"
register: consul_req
changed_when: "False"
changed_when: false
check_mode: "False"
- name: fail if no grafana found
......
......@@ -17,7 +17,7 @@
delegate_to: 127.0.0.1
become: "False"
run_once: "True"
changed_when: "False"
changed_when: false
- name: Download Liftbridge
get_url:
......
---
- name: make servers group
changed_when: "False"
changed_when: false
add_host:
group: svc-mongo-primary
host: "{{ item }}"
......
......@@ -3,7 +3,7 @@
- name: check if mongod running
command: pgrep -x mongod -c
failed_when: "False"
changed_when: "False"
changed_when: false
register: mongod_running
check_mode: "False"
......@@ -16,7 +16,7 @@
- name: check mongo disk size
shell: df /var/lib/mongo/ | grep -Po '/dev.+\K...(?=\%)'
changed_when: "False"
changed_when: false
failed_when: "False"
register: mongod_dir_size
check_mode: "False"
......@@ -35,7 +35,7 @@
url: "http://127.0.0.1:8500/v1/health/service/mongo"
return_content: "True"
register: consul_req
changed_when: "False"
changed_when: false
check_mode: "False"
- name: fail if no mongo found
......
......@@ -17,7 +17,7 @@
delegate_to: 127.0.0.1
become: "False"
run_once: "True"
changed_when: "False"
changed_when: false
- name: Download Nats
get_url:
......
......@@ -3,7 +3,7 @@
- name: check if nginx running
command: pgrep -x nginx -c
failed_when: "False"
changed_when: "False"
changed_when: false
register: nginx_running
check_mode: "False"
......@@ -19,7 +19,7 @@
url: "https://{{ noc_web_host }}/ng_stats"
validate_certs: "{{ not nginx_self_signed_cerificate }}"
register: nginx_ping
changed_when: "False"
changed_when: false
failed_when: "False"
check_mode: "False"
......@@ -45,7 +45,7 @@
url: "https://{{ noc_web_host }}/api/login/index.html"
validate_certs: "{{ not nginx_self_signed_cerificate }}"
register: nginx_ping
changed_when: "False"
changed_when: false
failed_when: "False"
check_mode: "False"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment