I can get the basic disk space command (df) to work when using a F5 module 
(bigip_command:) (which does use provider:).  However, the F5 modules do 
not support (AWK, GREP, SED, etc.) (which is a bummer), like (shell:) and 
(command:) do.  I may end up having to use (bigip_command:) to grab the 
disk space, and then use a separate Ansible (regex_search) task to filter 
for what I want, which is what I have done in the past (albeit this is an 
extra step).
On Thursday, August 17, 2023 at 10:26:35 AM UTC-4 Harry Clendening wrote:

> Hello Brian.  Thank you for your reply.  Please all me to provide some 
> additional context based on your suggestion (I should have mentioned this 
> on my initial post):
>
> We are working with F5 BIG-IP devices and using REST API  (443) (
> https://clouddocs.f5.com/products/orchestration/ansible/devel/usage/playbook_tutorial.html)
>  
> for the remote device connection, and not SSH (22).  If I remove 
> (connection: local), Ansible try's to connect using SSH (22) (which is 
> blocked).  Since the (shell:) module does not appear to support the F5 
> (provider:) credentials/connection (please see example below), I'm not sure 
> how to get (shell:) to connect to a remote host.  I have tried adding 
> (delegate_to: server1) to the (shell:) command and it simply ignores it.
>
> vars:
>   provider:
>     password: password
>     server: 1.1.1.1
>     user: admin_name
>     validate_certs: no
>     server_port: 443
>
>
> On Thursday, August 17, 2023 at 10:00:18 AM UTC-4 Brian Coca wrote:
>
>> That is becase 'connection: local' forces using the 'local' connection 
>> plugin, which means that instead of executing on the target it 'forks 
>> locally' to execute the module. 
>> Just remove it, 99% of the time you do not need to specify `connection`. 
>>
>> -- 
>> ---------- 
>> Brian Coca 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6e98371a-27e1-45ad-a91c-16a2e6f64107n%40googlegroups.com.

Reply via email to