Commit 0671f995 authored by EKbfh's avatar EKbfh 🐼
Browse files

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

Fix ansible changed_when

See merge request !5748
parents 04fbc4a2 8efe8fa6
Pipeline #33561 passed with stages
in 87 minutes and 30 seconds
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
chdir: "{{ noc_root }}" chdir: "{{ noc_root }}"
become: "True" become: "True"
become_user: "{{ noc_user }}" become_user: "{{ noc_user }}"
changed_when: "False" changed_when: false
- name: migrate liftbridge partitions - name: migrate liftbridge partitions
command: ./noc migrate-liftbridge command: ./noc migrate-liftbridge
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: check if supervisord running - name: check if supervisord running
command: pgrep -f supervisord -c command: pgrep -f supervisord -c
failed_when: "False" failed_when: "False"
changed_when: "False" changed_when: false
register: supervisord_running register: supervisord_running
check_mode: "False" check_mode: "False"
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
- name: check if noc services are down - name: check if noc services are down
shell: /opt/noc/noc ctl status | grep -v RUNNING shell: /opt/noc/noc ctl status | grep -v RUNNING
become: "True" become: "True"
changed_when: "False" changed_when: false
register: noc_status register: noc_status
failed_when: "False" failed_when: "False"
check_mode: "False" check_mode: "False"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: check if noc running - name: check if noc running
command: "{{ noc_root }}/noc ctl status" command: "{{ noc_root }}/noc ctl status"
check_mode: "False" check_mode: "False"
changed_when: "False" changed_when: false
register: noc_ctl_status register: noc_ctl_status
when: tower_serial_restart_noc when: tower_serial_restart_noc
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
- name: Serial NOC restart - name: Serial NOC restart
command: "{{ noc_root }}/noc ctl serialrestart all" command: "{{ noc_root }}/noc ctl serialrestart all"
when: tower_serial_restart_noc when: tower_serial_restart_noc
changed_when: "False" changed_when: false
- name: Restart NOC node - name: Restart NOC node
service: service:
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
state: stopped state: stopped
become: "True" become: "True"
failed_when: "False" failed_when: "False"
changed_when: "False" changed_when: false
when: tower_stop_noc when: tower_stop_noc
- name: Setup hostname - name: Setup hostname
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
command: grep -q sse4_2 /proc/cpuinfo command: grep -q sse4_2 /proc/cpuinfo
register: sse42_support register: sse42_support
failed_when: "False" failed_when: "False"
changed_when: "False" changed_when: false
check_mode: "False" check_mode: "False"
- name: fail if SSE 4.2 not supported - name: fail if SSE 4.2 not supported
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
command: grep -q SSE4.2 /var/run/dmesg.boot command: grep -q SSE4.2 /var/run/dmesg.boot
register: sse42_support register: sse42_support
failed_when: "False" failed_when: "False"
changed_when: "False" changed_when: false
check_mode: "False" check_mode: "False"
- name: fail if SSE 4.2 not supported - name: fail if SSE 4.2 not supported
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: check if clickhouse-server running - name: check if clickhouse-server running
command: pgrep -f clickhouse-server -c command: pgrep -f clickhouse-server -c
failed_when: "False" failed_when: "False"
changed_when: "False" changed_when: false
register: clickhouse_server_running register: clickhouse_server_running
check_mode: "False" check_mode: "False"
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
become: "False" become: "False"
run_once: "True" run_once: "True"
changed_when: "False" changed_when: false
- name: Download Consul-template - name: Download Consul-template
get_url: get_url:
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: check if consul_template running - name: check if consul_template running
command: pgrep -x consul-template -c command: pgrep -x consul-template -c
failed_when: "False" failed_when: "False"
changed_when: "False" changed_when: false
register: consul_template_running register: consul_template_running
check_mode: "False" check_mode: "False"
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
become: "False" become: "False"
run_once: "True" run_once: "True"
changed_when: "False" changed_when: false
- name: Download Consul - name: Download Consul
get_url: get_url:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# File: main.yml - Main tasks for Consul # File: main.yml - Main tasks for Consul
- name: make servers group - name: make servers group
changed_when: "False" changed_when: false
add_host: add_host:
group: svc-consul-server group: svc-consul-server
host: "{{ item }}" host: "{{ item }}"
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
name: firewalld name: firewalld
check_mode: "True" check_mode: "True"
register: firewalld_state register: firewalld_state
changed_when: "False" changed_when: false
ignore_errors: "True" ignore_errors: "True"
tags: tags:
- config - config
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
name: firewalld name: firewalld
check_mode: "True" check_mode: "True"
register: firewalld_state register: firewalld_state
changed_when: "False" changed_when: false
ignore_errors: "True" ignore_errors: "True"
tags: tags:
- config - config
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
environment: environment:
ANSIBLE_JINJA2_NATIVE: true ANSIBLE_JINJA2_NATIVE: true
register: consul_key_response register: consul_key_response
changed_when: "False" changed_when: false
check_mode: "False" check_mode: "False"
# if default value is unset provide default json # if default value is unset provide default json
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: check if consul running - name: check if consul running
command: pgrep -x consul -c command: pgrep -x consul -c
failed_when: "False" failed_when: "False"
changed_when: "False" changed_when: false
register: consul_running register: consul_running
check_mode: "False" check_mode: "False"
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
uri: uri:
url: "http://127.0.0.1:8500/v1/health/node/{{ host }}/" url: "http://127.0.0.1:8500/v1/health/node/{{ host }}/"
register: consul_ping register: consul_ping
changed_when: "False" changed_when: false
check_mode: "False" check_mode: "False"
loop_control: loop_control:
loop_var: host loop_var: host
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: check if grafana running - name: check if grafana running
command: pgrep -x grafana-server -c command: pgrep -x grafana-server -c
failed_when: "False" failed_when: "False"
changed_when: "False" changed_when: false
register: grafana_running register: grafana_running
check_mode: "False" check_mode: "False"
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
url: "http://127.0.0.1:8500/v1/health/service/grafana" url: "http://127.0.0.1:8500/v1/health/service/grafana"
return_content: "True" return_content: "True"
register: consul_req register: consul_req
changed_when: "False" changed_when: false
check_mode: "False" check_mode: "False"
- name: fail if no grafana found - name: fail if no grafana found
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
become: "False" become: "False"
run_once: "True" run_once: "True"
changed_when: "False" changed_when: false
- name: Download Liftbridge - name: Download Liftbridge
get_url: get_url:
......
--- ---
- name: make servers group - name: make servers group
changed_when: "False" changed_when: false
add_host: add_host:
group: svc-mongo-primary group: svc-mongo-primary
host: "{{ item }}" host: "{{ item }}"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: check if mongod running - name: check if mongod running
command: pgrep -x mongod -c command: pgrep -x mongod -c
failed_when: "False" failed_when: "False"
changed_when: "False" changed_when: false
register: mongod_running register: mongod_running
check_mode: "False" check_mode: "False"
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
- name: check mongo disk size - name: check mongo disk size
shell: df /var/lib/mongo/ | grep -Po '/dev.+\K...(?=\%)' shell: df /var/lib/mongo/ | grep -Po '/dev.+\K...(?=\%)'
changed_when: "False" changed_when: false
failed_when: "False" failed_when: "False"
register: mongod_dir_size register: mongod_dir_size
check_mode: "False" check_mode: "False"
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
url: "http://127.0.0.1:8500/v1/health/service/mongo" url: "http://127.0.0.1:8500/v1/health/service/mongo"
return_content: "True" return_content: "True"
register: consul_req register: consul_req
changed_when: "False" changed_when: false
check_mode: "False" check_mode: "False"
- name: fail if no mongo found - name: fail if no mongo found
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
delegate_to: 127.0.0.1 delegate_to: 127.0.0.1
become: "False" become: "False"
run_once: "True" run_once: "True"
changed_when: "False" changed_when: false
- name: Download Nats - name: Download Nats
get_url: get_url:
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: check if nginx running - name: check if nginx running
command: pgrep -x nginx -c command: pgrep -x nginx -c
failed_when: "False" failed_when: "False"
changed_when: "False" changed_when: false
register: nginx_running register: nginx_running
check_mode: "False" check_mode: "False"
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
url: "https://{{ noc_web_host }}/ng_stats" url: "https://{{ noc_web_host }}/ng_stats"
validate_certs: "{{ not nginx_self_signed_cerificate }}" validate_certs: "{{ not nginx_self_signed_cerificate }}"
register: nginx_ping register: nginx_ping
changed_when: "False" changed_when: false
failed_when: "False" failed_when: "False"
check_mode: "False" check_mode: "False"
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
url: "https://{{ noc_web_host }}/api/login/index.html" url: "https://{{ noc_web_host }}/api/login/index.html"
validate_certs: "{{ not nginx_self_signed_cerificate }}" validate_certs: "{{ not nginx_self_signed_cerificate }}"
register: nginx_ping register: nginx_ping
changed_when: "False" changed_when: false
failed_when: "False" failed_when: "False"
check_mode: "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