Sunday, March 04, 2018

Ansible Nested With_Items in Debug module

Use srvctl to list and display all Oracle DB instance status on the host

   - name: display databases in the GI via srvctl
     shell: /u01/app/ config database
     register: dblist
   - debug: msg="{{ dblist.stdout_lines }}"

   - name: display status of databases in the GI via srvctl
     shell:  /u01/app/ status database -d  "{{ item }}"
     register: dbstatus
        - "{{ dblist.stdout_lines }}"
   - debug: msg="{{ item.stdout_lines }}"
        - "{{ dbstatus.results }}"

No comments: