community / community.network / 0.1.0 / module / bigip_asm_policy
Removed in 2.12
Reason:The bigip_asm_policy module has been split into three new modules to handle import, export and general policy management. This will allow scalability of the asm policy management as well as ease of maintenance. Additionally to further reduce the burden of having multiple smaller module F5 has created asm_policy role in Ansible Galaxy for a more declarative way of ASM policy management. | Alternative:bigip_asm_policy_manage
Manage BIG-IP ASM policies
Authors: Wojciech Wypior (@wojtek0806), Tim Rupp (@caphrim007)
Install with ansible-galaxy collection install community.network:==0.1.0
collections: - name: community.network version: 0.1.0
Manage BIG-IP ASM policies.
- name: Import and activate ASM policy bigip_asm_policy: name: new_asm_policy file: /root/asm_policy.xml active: yes state: present provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Import ASM policy from template bigip_asm_policy: name: new_sharepoint_policy template: SharePoint 2007 (http) state: present provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Create blank ASM policy bigip_asm_policy: name: new_blank_policy state: present provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Create blank ASM policy and activate bigip_asm_policy: name: new_blank_policy active: yes state: present provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Activate ASM policy bigip_asm_policy: name: inactive_policy active: yes state: present provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Deactivate ASM policy bigip_asm_policy: name: active_policy state: present provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Import and activate ASM policy in Role bigip_asm_policy: name: new_asm_policy file: "{{ role_path }}/files/asm_policy.xml" active: yes state: present provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
- name: Import ASM binary policy bigip_asm_policy: name: new_asm_policy file: "/root/asm_policy.plc" active: yes state: present provider: server: lb.mydomain.com user: admin password: secret delegate_to: localhost
file: description: - Full path to a policy file to be imported into the BIG-IP ASM. - Policy files exported from newer versions of BIG-IP cannot be imported into older versions of BIG-IP. The opposite, however, is true; you can import older into newer. name: description: - The ASM policy to manage or create. required: true state: choices: - present - absent default: present description: - When C(state) is C(present), and C(file) or C(template) parameter is provided, new ASM policy is imported and created with the given C(name). - When C(state) is present and no C(file) or C(template) parameter is provided new blank ASM policy is created with the given C(name). - When C(state) is C(absent), ensures that the policy is removed, even if it is currently active. active: default: false description: - If C(yes) will apply and activate existing inactive policy. If C(no), it will deactivate existing active policy. Generally should be C(yes) only in cases where you want to activate new or existing policy. type: bool provider: description: - A dict object containing connection details. suboptions: auth_provider: description: - Configures the auth provider for to obtain authentication tokens from the remote device. - This option is really used when working with BIG-IQ devices. type: str password: aliases: - pass - pwd description: - The password for the user account used to connect to the BIG-IP. - You may omit this option by setting the environment variable C(F5_PASSWORD). required: true type: str server: description: - The BIG-IP host. - You may omit this option by setting the environment variable C(F5_SERVER). required: true type: str server_port: default: 443 description: - The BIG-IP server port. - You may omit this option by setting the environment variable C(F5_SERVER_PORT). type: int ssh_keyfile: description: - Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for I(cli) transports. - You may omit this option by setting the environment variable C(ANSIBLE_NET_SSH_KEYFILE). type: path timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. type: int transport: choices: - cli - rest default: rest description: - Configures the transport connection to use when connecting to the remote device. type: str user: description: - The username to connect to the BIG-IP with. This user must have administrative privileges on the device. - You may omit this option by setting the environment variable C(F5_USER). required: true type: str validate_certs: default: true description: - If C(no), SSL certificates are not validated. Use this only on personally controlled sites using self-signed certificates. - You may omit this option by setting the environment variable C(F5_VALIDATE_CERTS). type: bool type: dict template: choices: - ActiveSync v1.0 v2.0 (http) - ActiveSync v1.0 v2.0 (https) - Comprehensive - Drupal - Fundamental - Joomla - LotusDomino 6.5 (http) - LotusDomino 6.5 (https) - OWA Exchange 2003 (http) - OWA Exchange 2003 (https) - OWA Exchange 2003 with ActiveSync (http) - OWA Exchange 2003 with ActiveSync (https) - OWA Exchange 2007 (http) - OWA Exchange 2007 (https) - OWA Exchange 2007 with ActiveSync (http) - OWA Exchange 2007 with ActiveSync (https) - OWA Exchange 2010 (http) - OWA Exchange 2010 (https) - Oracle 10g Portal (http) - Oracle 10g Portal (https) - Oracle Applications 11i (http) - Oracle Applications 11i (https) - PeopleSoft Portal 9 (http) - PeopleSoft Portal 9 (https) - Rapid Deployment Policy - SAP NetWeaver 7 (http) - SAP NetWeaver 7 (https) - SharePoint 2003 (http) - SharePoint 2003 (https) - SharePoint 2007 (http) - SharePoint 2007 (https) - SharePoint 2010 (http) - SharePoint 2010 (https) - Vulnerability Assessment Baseline - Wordpress description: - An ASM policy built-in template. If the template does not exist we will raise an error. - Once the policy has been created, this value cannot change. - The C(Comprehensive), C(Drupal), C(Fundamental), C(Joomla), C(Vulnerability Assessment Baseline), and C(Wordpress) templates are only available on BIG-IP versions >= 13. partition: default: Common description: - Device partition to manage resources on.
active: description: Set when activating/deactivating ASM policy returned: changed sample: true type: bool file: description: Local path to ASM policy file. returned: changed sample: /root/some_policy.xml type: str name: description: Name of the ASM policy to be managed/created returned: changed sample: Asm_APP1_Transparent type: str state: description: Action performed on the target device. returned: changed sample: absent type: str template: description: Name of the built-in ASM policy template returned: changed sample: OWA Exchange 2007 (https) type: str