Forum Discussion
F5 APM/LTM Ansible module - which to use for changing apm access profile attached to VS?
- Jan 29, 2021
Hello Sarlindo.
As I said in my previous response :-), 'profiles' option is a 'replace-all-with' action, so you have to introduce a complete list of profiles to assign on the VS.
In the documentation states this:
"List of profiles (HTTP, ClientSSL, ServerSSL, etc) to apply to both sides of the connection (client-side and server-side) ... If you want to remove a profile from the list of profiles currently active on the virtual, simply remove it from the profiles list".
Conclusion:
- With AP profile: {{ tcp http myaccess-prof }}
- Without AP profile: {{ tcp http }}
So, your variable "ans_f5_access_profile" should be a complete list with all the profiles assigned to the VS.
If this was helpful, I will appreciate if you mark my answer as 'the best' to help other people to find it ;-).
Regards,
Dario.
Hello Dario,
Thanks for this, so I should use something like the following to attach the profile I want? And to detach the profile I assume I need to use the "state: absent" ?
- name: Attach policy to VS
bigip_virtual_server:
state: present
partition: "{{ ans_f5_partition }}"
name: "{{ ans_f5_virtual_server }}"
profiles:
- "{{ ans_f5_access_profile }}"
provider:
server: "{{ ans_f5_endpoint_url }}"
user: "{{ ans_f5_userid }}"
password: "{{ ans_f5_password }}"
validate_certs: no
Just ommit this 'state' option.
Please, let me know if everything works as expected.
Regards,
Dario.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com