Generate CSR via Ansible script
Hi All,
I am looking some guidance to generate CSR in LB device via ansible. tried many option but unable to proceed. Infact unable to use module ansible 'bigip_certificate_csr'. How you guys are doing this part.
---
- name: Generate CSR on F5 BIG-IP
hosts: f5_devices
gather_facts: no
connection: local
tasks:
- name: Generate CSR
bigip_certificate_csr:
name: "{{ csr_name }}" # Name for the CSR
common_name: "{{ common_name }}" # Common Name (e.g., example.com)
partition: "{{ partition }}" # Partition where the certificate will be stored
country: "{{ country }}" # Country code (e.g., US)
state: "{{ state }}" # State or province name
locality: "{{ locality }}" # Locality or city name
organization: "{{ organization }}" # Organization name
organization_unit: "{{ organization_unit }}" # Organization unit name
private_key_path: "/path/to/private_key.key" # Path to private key file on F5
overwrite: no # Whether to overwrite existing CSR if one exists
delegate_to: localhost
vars:
csr_name: "example_csr" # Name for the CSR
common_name: "example.com" # Common Name (e.g., example.com)
partition: "Common" # Partition where the certificate will be stored
country: "US" # Country code (e.g., US)
state: "California" # State or province name
locality: "San Francisco" # Locality or city name
organization: "Example Corp" # Organization name
organization_unit: "IT" # Organization unit name
Thanks,