F5Networks / f5-ansible

Imperative Ansible modules for F5 BIG-IP products
GNU General Public License v3.0
374 stars 229 forks source link

Add support for ssh options in f5networks.f5_modules.bigip_sys_global module #2408

Open AugWin opened 3 months ago

AugWin commented 3 months ago

Is your feature request related to a problem? Please describe.

Currently have to use the bigip_cli_script module to run these commands:

modify /sys global-settings ssh-session-limit enabled modify /sys global-settings ssh-max-session-limit 10 modify /sys global-settings ssh-max-session-limit-per-user 2

However, there is an issue where it will try to run the second 2 commands before the "ssh-session-limit enabled" command. This results in a failure as that has to be set to 'enabled' in order to run the other 2. For some reason Ansible is not running the commands in the order listed.

Describe the solution you'd like

Add support for these 3 ssh options in the bigip_sys_global module as found here in tmsh reference - https://clouddocs.f5.com/cli/tmsh-reference/latest/modules/sys/sys_global-settings.html

Describe alternatives you've considered

Separating into 2 separate tasks to run ssh-session-limit enabled first, then the other task executes the other 2 commands works to get around this problem for now.

pgouband commented 3 months ago

Hi @AugWin,

Have you tried to use bigip_command module? https://clouddocs.f5.com/products/orchestration/ansible/devel/modules/bigip_command_module.html#bigip-command-module-3

AugWin commented 3 months ago

Hi @pgouband. Thanks for your reply. I'm sorry - bigip_command is the module being used resulting in the out of order execution behavior described. I accidentally linked the incorrect module when I opened the issue.