1234567891011121314151617181920212223242526272829303132333435 |
- ---
- - name: Apply configuration for- "{{ inventory_hostname }}" - "{{ item }}"
- uri:
- url: http://{{ inventory_hostname }}/admin/launch?script=json
- method: POST
- body_format: json
- headers:
- Cookie: "{{ login.set_cookie.split(';')[0] }}"
- body:
- {
- "commands":
- [
- "{{ item }}"
- ]
- }
- register: global_conf
- - name: Status check for - "{{ inventory_hostname }}" - "{{ item }}"
- fail:
- msg: "{{ global_conf.json }}"
- when: global_conf.json.status != "OK"
|