at Re: [ansible-devel] Re: Using Ansible how to connect Oracle DB on Linux & run command "show pdb" to display oracle pluggable DB, "shutdown immediate" to stop DB and start DB

2023-07-25 Thread Learner
Thank you for the response. what is the correct code I have to use?

On Monday, July 24, 2023 at 6:46:48 PM UTC+5:30 bc...@redhat.com wrote:

> Several things seem to be off with your output, it looks like a
> recursive copy into itself, aside from that, the base error does not
> seem to match the commands shown:
>
> 'cmd': ucat: No such file or directory", "cut: fields are numbered
> from 1", "Try 'cut --help' for more information.
>
> Looks like typo in a shell command/script (meant `cat`?) or `ucat` is
> not in the PATH
>
>
> -- 
> --
> Brian Coca
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/58be2796-43a5-42e0-bd58-7adc1625551bn%40googlegroups.com.


Re: [ansible-devel] Re: Using Ansible how to connect Oracle DB on Linux & run command "show pdb" to display oracle pluggable DB, "shutdown immediate" to stop DB and start DB

2023-07-24 Thread Brian Coca
Several things seem to be off with your output, it looks like a
recursive copy into itself, aside from that, the base error does not
seem to match the commands shown:

'cmd': ucat: No such file or directory", "cut: fields are numbered
from 1", "Try 'cut --help' for more information.

Looks like typo in a shell command/script (meant `cat`?) or `ucat` is
not in the PATH


-- 
--
Brian Coca

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/CACVha7d4wFwzx7iX2KYBEcOrsxrU3ogmaUqesA5XLyGgqsDTdA%40mail.gmail.com.


[ansible-devel] Re: Using Ansible how to connect Oracle DB on Linux & run command "show pdb" to display oracle pluggable DB, "shutdown immediate" to stop DB and start DB

2023-07-23 Thread Learner
Anyone please guide.

On Saturday, July 22, 2023 at 8:46:08 PM UTC+5:30 Learner wrote:

> Hi All,
> Using Ansible how to connect Oracle DB on Linux & run command "show pdb" 
> to display oracle pluggable DB, "shutdown immediate" to stop DB and start DB 
> 
> .
>
> Code:   - name: Run show pdbs
> shell: |
>   {{ oracle_home }}/bin/sqlplus / as sysdba <   show pdbs;
>   exit
>   EOF
> register: query_output
>
>   - name: Display query output
> debug:
>   msg: "{{ query_output.stdout_lines }}"
>
> Its getting failed with below error:
>
> fatal: [10.192.90.43]: FAILED! => {"changed": true, "cmd": 
> "\"{'stderr_lines': [], u'changed': True, u'end': u'2023-07-22 
> 15:05:49.418929', 'failed': False, u'stdout': u'/u01/app/oracle/product/
> 19.3.0.0/db_1', u'cmd': u\"cat /etc/oratab | egrep -v '^#|^$' | grep -v 
> ASM | cut -d ':' -f2\", u'rc': 0, u'start': u'2023-07-22 15:05:49.413535', 
> u'stderr': u'', u'delta': u'0:00:00.005394', 'stdout_lines': 
> [u'/u01/app/oracle/product/19.3.0.0/db_1']}/bin/sqlplus 
>  / as sysdba < pdbs;\nexit\nEOF\"\n", "delta": "0:00:00.005358", "end": "2023-07-22 
> 15:05:52.954037", "msg": "non-zero return code", "rc": 1, "start": 
> "2023-07-22 15:05:52.948679", "stderr": "/bin/sh: {'stderr_lines': [], 
> u'changed': True, u'end': u'2023-07-22 15:05:49.418929', 'failed': False, 
> u'stdout': u'/u01/app/oracle/product/19.3.0.0/db_1', u'cmd': ucat: No 
> such file or directory\ncut: fields are numbered from 1\nTry 'cut --help' 
> for more information.", "stderr_lines": ["/bin/sh: {'stderr_lines': [], 
> u'changed': True, u'end': u'2023-07-22 15:05:49.418929', 'failed': False, 
> u'stdout': u'/u01/app/oracle/product/19.3.0.0/db_1', u'cmd': ucat: No 
> such file or directory", "cut: fields are numbered from 1", "Try 'cut 
> --help' for more information."], "stdout": "", "stdout_lines": []}
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/cdeb3ef0-ef78-4805-93df-13ff23bb3f3en%40googlegroups.com.