Created
February 10, 2017 18:46
-
-
Save tbielawa/5ebc8a2b76f85385aa8dd664f8783bdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using /home/tbielawa/rhat/os/openshift-ansible/ansible.cfg as config file | |
PLAY [masters] ***************************************************************** | |
... | |
TASK [Do a 'yedit' for YAML files with 'servingInfo' in them] ****************** | |
Friday 10 February 2017 10:43:35 -0800 (0:00:01.617) 0:00:02.383 ******* | |
ok: [m01.example.com] => { | |
"changed": false, | |
"result": { | |
"bindAddress": "0.0.0.0:8443", | |
"bindNetwork": "tcp4", | |
"certFile": "master.server.crt", | |
"clientCA": "ca-bundle.crt", | |
"keyFile": "master.server.key", | |
"maxRequestsInFlight": 500, | |
"requestTimeoutSeconds": 3600 | |
}, | |
"state": "list" | |
} | |
TASK [We found 'servingInfo' in the file] ************************************** | |
Friday 10 February 2017 10:43:36 -0800 (0:00:00.433) 0:00:02.816 ******* | |
ok: [m01.example.com] => {} | |
MSG: | |
Found 'servingInfo' | |
TASK [What did it register?] *************************************************** | |
Friday 10 February 2017 10:43:36 -0800 (0:00:00.113) 0:00:02.930 ******* | |
ok: [m01.example.com] => { | |
"yedit_search1": { | |
"changed": false, | |
"result": { | |
"bindAddress": "0.0.0.0:8443", | |
"bindNetwork": "tcp4", | |
"certFile": "master.server.crt", | |
"clientCA": "ca-bundle.crt", | |
"keyFile": "master.server.key", | |
"maxRequestsInFlight": 500, | |
"requestTimeoutSeconds": 3600 | |
}, | |
"state": "list" | |
} | |
} | |
TASK [Do a 'yedit' for YAML files with 'servinggInfooo' in them] *************** | |
Friday 10 February 2017 10:43:36 -0800 (0:00:00.124) 0:00:03.055 ******* | |
ok: [m01.example.com] => { | |
"changed": false, | |
"result": {}, | |
"state": "list" | |
} | |
TASK [We found 'servinggInfooo' in the file] *********************************** | |
Friday 10 February 2017 10:43:36 -0800 (0:00:00.298) 0:00:03.354 ******* | |
skipping: [m01.example.com] => { | |
"changed": false, | |
"skip_reason": "Conditional check failed", | |
"skipped": true | |
} | |
TASK [What did it register?] *************************************************** | |
Friday 10 February 2017 10:43:37 -0800 (0:00:00.116) 0:00:03.471 ******* | |
ok: [m01.example.com] => { | |
"yedit_search2": { | |
"changed": false, | |
"result": {}, | |
"state": "list" | |
} | |
} | |
PLAY RECAP ********************************************************************* | |
m01.example.com : ok=7 changed=0 unreachable=0 failed=0 | |
Friday 10 February 2017 10:43:37 -0800 (0:00:00.176) 0:00:03.647 ******* | |
=============================================================================== | |
lib_utils : lib_utils ensure python-ruamel-yaml package is on target ---- 1.62s | |
setup ------------------------------------------------------------------- 0.60s | |
Do a 'yedit' for YAML files with 'servingInfo' in them ------------------ 0.43s | |
Do a 'yedit' for YAML files with 'servinggInfooo' in them --------------- 0.30s | |
What did it register? --------------------------------------------------- 0.18s | |
What did it register? --------------------------------------------------- 0.12s | |
We found 'servinggInfooo' in the file ----------------------------------- 0.12s | |
We found 'servingInfo' in the file -------------------------------------- 0.11s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: masters | |
become: yes | |
become_user: root | |
gather_facts: yes | |
vars: | |
find_path: "/etc/origin/master/" | |
find_str1: "servingInfo" | |
find_str2: "servinggInfooo" | |
tasks: | |
- include_role: | |
name: lib_utils | |
- name: "Do a 'yedit' for YAML files with '{{ find_str1 }}' in them" | |
yedit: | |
src: "{{ find_path }}/master-config.yaml" | |
key: "{{ find_str1 }}" | |
state: list | |
register: yedit_search1 | |
- name: "We found '{{ find_str1 }}' in the file" | |
debug: | |
msg: "Found '{{ find_str1 }}'" | |
when: | |
- yedit_search1.result != {} | |
- name: What did it register? | |
debug: var=yedit_search1 | |
- name: "Do a 'yedit' for YAML files with '{{ find_str2 }}' in them" | |
yedit: | |
src: "{{ find_path }}/master-config.yaml" | |
key: "{{ find_str2 }}" | |
state: list | |
register: yedit_search2 | |
- name: "We found '{{ find_str2 }}' in the file" | |
debug: | |
msg: "Found '{{ find_str2 }}'" | |
when: | |
- yedit_search2.result != {} | |
- name: What did it register? | |
debug: var=yedit_search2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment