Cant save output to file?

17 views
Skip to first unread message

Steven Williams

unread,
Aug 21, 2019, 3:07:58 PM8/21/19
to Ansible Development

Stevens-MacBook-Pro:ansible stevenwiliams$ ansible IOL_Routers -i ./hosts -m raw -a "show run" -u cisco -k > filetest

-bash: filetest: Permission denied

Stevens-MacBook-Pro:ansible stevenwiliams$ 


what am I missing here??



Nathan Brady

unread,
Aug 21, 2019, 3:21:49 PM8/21/19
to Steven Williams, Ansible Development
Steven,

I use tee so I can see the output and pass the full path.

eg.
Stevens-MacBook-Pro:ansible stevenwiliams$ ansible IOL_Routers -i ./hosts -m raw -a "show run" -u cisco -k | tee /tmp/filetest

The issue may be with the directory permissions.

Nathan Brady
Red Hat Consulting


--
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-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/cf1e8413-3282-4341-bc98-57d176be4d74%40googlegroups.com.

Steven Williams

unread,
Aug 21, 2019, 4:59:10 PM8/21/19
to Ansible Development
Issue was permissions within the ansible folder itself. directed to another directory and it worked. 


On Wednesday, August 21, 2019 at 2:21:49 PM UTC-5, Nathan Brady wrote:
Steven,

I use tee so I can see the output and pass the full path.

eg.
Stevens-MacBook-Pro:ansible stevenwiliams$ ansible IOL_Routers -i ./hosts -m raw -a "show run" -u cisco -k | tee /tmp/filetest

The issue may be with the directory permissions.

Nathan Brady
Red Hat Consulting


On Wed, Aug 21, 2019 at 3:08 PM Steven Williams <stevenjw...@gmail.com> wrote:

Stevens-MacBook-Pro:ansible stevenwiliams$ ansible IOL_Routers -i ./hosts -m raw -a "show run" -u cisco -k > filetest

-bash: filetest: Permission denied

Stevens-MacBook-Pro:ansible stevenwiliams$ 


what am I missing here??



--
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 ansibl...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages