1351
This commit is contained in:
@@ -1054,7 +1054,7 @@
|
|||||||
payload_encoding: "string"
|
payload_encoding: "string"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
# ----------------------- Dev2 fw_printenv size → indoor_bootvar -----------------------
|
# ----------------------- Dev2 fw_printenv size → indoor_bootenv -----------------------
|
||||||
- name: Dev2 | Read fw_printenv size (tunnel)
|
- name: Dev2 | Read fw_printenv size (tunnel)
|
||||||
when:
|
when:
|
||||||
- tunnel_ok | default(false)
|
- tunnel_ok | default(false)
|
||||||
@@ -1097,7 +1097,7 @@
|
|||||||
- name: Dev2 | Select fw_printenv size output
|
- name: Dev2 | Select fw_printenv size output
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
set_fact:
|
set_fact:
|
||||||
indoor_bootvar_raw: >-
|
indoor_bootenv_raw: >-
|
||||||
{{
|
{{
|
||||||
(dev2_bootenv_wc_tunnel.stdout | default('') | trim)
|
(dev2_bootenv_wc_tunnel.stdout | default('') | trim)
|
||||||
if (
|
if (
|
||||||
@@ -1116,17 +1116,17 @@
|
|||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
- name: Dev2 | Normalize indoor_bootvar value
|
- name: Dev2 | Normalize indoor_bootenv value
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
set_fact:
|
set_fact:
|
||||||
indoor_bootvar_value: >-
|
indoor_bootenv_value: >-
|
||||||
{{
|
{{
|
||||||
'unavailable'
|
'unavailable'
|
||||||
if (indoor_bootvar_raw | default('') | trim) in ['', '0']
|
if (indoor_bootenv_raw | default('') | trim) in ['', '0']
|
||||||
else (indoor_bootvar_raw | default('') | trim)
|
else (indoor_bootenv_raw | default('') | trim)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
- name: Publish Dev2 indoor_bootvar custom field
|
- name: Publish Dev2 indoor_bootenv custom field
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
uri:
|
uri:
|
||||||
url: "http://{{ rmq_host }}:{{ rmq_port }}/api/exchanges/{{ rmq_vhost|urlencode }}/{{ rmq_exchange|urlencode }}/publish"
|
url: "http://{{ rmq_host }}:{{ rmq_port }}/api/exchanges/{{ rmq_vhost|urlencode }}/{{ rmq_exchange|urlencode }}/publish"
|
||||||
@@ -1143,8 +1143,8 @@
|
|||||||
payload: "{{ {
|
payload: "{{ {
|
||||||
'inscope_device': (ansible_hostname|default(inventory_hostname)),
|
'inscope_device': (ansible_hostname|default(inventory_hostname)),
|
||||||
'task_name': 'custom_field_set',
|
'task_name': 'custom_field_set',
|
||||||
'task_add1': 'indoor_bootvar',
|
'task_add1': 'indoor_bootenv',
|
||||||
'task_result': indoor_bootvar_value
|
'task_result': indoor_bootenv_value
|
||||||
} | to_json }}"
|
} | to_json }}"
|
||||||
payload_encoding: "string"
|
payload_encoding: "string"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|||||||
Reference in New Issue
Block a user