Ansible
69 TopicsError when running bigip_command Playbook against LTM : Syntax Error: unexpected argument /bin/sh\n
I am running a Playbook to test bigip_command using ansible [core 2.15.3] against LTM running 15.1.6.1. When I run the playbook I get the following message: UNREACHABLE! => { “changed”: false, “msg”: “Failed to create temporary directory. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in "/tmp", for more error information use -vvv. Failed command was: ( umask 77 && mkdir -p "echo $HOME/tmp"&& mkdir "echo $HOME/tmp/ansible-tmp-1709037153.0021555-3167181-73985055078518" && echo ansible-tmp-1709037153.0021555-3167181-73985055078518="echo $HOME/tmp/ansible-tmp-1709037153.0021555-3167181-73985055078518" ), exited with result 1”, “unreachable”: true } When I run the Playbook with -vvv flags I see the following line just before the error message pasted above: Failed to connect to the host via ssh: Syntax Error: unexpected argument “/bin/sh” Similarly, if I test the ssh I also see this same unexpected argument message: ansible all -m shell -a id -vvv Syntax Error: unexpected argument “/bin/sh”\n’ I have tried editing various things in hosts file and ansible.cfg but nothing I have tried seems to have made a difference. Is anyone familiar with this and what is needed to resolve this. Any help is greatly appreciated!277Views1like4CommentsAnsible Module bigip_device_info: what where they thinking
I was fiddeling around with ansible and wanted to build a playbook that triggers an HA-Sync, but only when there are pending changes (we don't use auto sync) and always sync from the active device to the group. Sounded like a straight forward job and should be easy using the following F5 Ansible modules: bigip_device_info (for failover_state, device_groups name and sync_status) bigip_configsync_action (for triggering the sync) But oh boy was I wrong. After debugging the JSON that was gathered by bigip_device_info I was pretty baffled, to be honest. Why does every singel maschine return the info of every maschine of the HA cluster and also arrange alphabeticallyby hostname? Imagine you have a cluster consisting of two applinaces named "applianceA" and applianceB" and you query both devices for failover_state, you get the following: Querying maschine "applianceA" for failover state: accessdevice_info.devices[0].failover_state = failover state of "applianceA" accessdevice_info.devices[1].failover_state = failover state of "applianceB" Querying maschine "applianceB" for failover state: accessdevice_info.devices[0].failover_state = failover state of "applianceA" accessdevice_info.devices[1].failover_state = failover state of "applianceB" This is in my opinion very pooly designed. I am expecting to get data from the particular device I am querying in the same excact location on every device. In this example one would have to first iterate over every item in the returend array, check if this is actually the data of the querried device and not it's HA partner. I don't think this is how ansible was supposed to work. Or maybe I'm just stupid and don't know how it's done correctly?840Views1like1CommentSuper-Netops Training lab3 fails because of expired ansible license
Hi - anyone here who controls the lab environment for the Super-Netops labs in Ravello environment ?? I'm running into the problem that lab 3.1 fail on step 1 under "Tower Core Objects". Whe I try to run this step specifially (not in the runner) - I get '403 forbidden' and details: "License has expired". Looking int the Ansible Tower it seems that the license ran out on June 20th 2019 !!?? Can anyone fix this please so I can continue with the lab??....which is very interesting and useful by the way, although having to work through the Linux Jumphost Console connection is a bit slow and difficult (bad resolution). Thanks, Arnór300Views1like0CommentsAnsible bigip_commands module and Bash
I'm hoping this is a simple question. I'm trying to use ansible to check for the presence of some files on a Big-IP. I've tried using the bigip_command module to call commands like grep and file, but I can't get it to run any bash commands, only tmsh. The description says "bigip_command – Run TMSH and BASH commands on F5 devices". How do I get it to run Bash commands? I must be missing something. Thanks in advance! https://clouddocs.f5.com/products/orchestration/ansible/devel/modules/bigip_command_module.html631Views1like0Comments