Samir
Jun 26, 2023MVP
Generate csr via ansible script
Hi All,
Did any one tried to create CSR via f5 ansible module. I am trying my but can't make it. Written below script but it is unable to find ansible module for csr.
- name: Generate F5 BIG-IP CSR
hosts: all
gather_facts: no
collections:
- f5networks.f5_modules
connection: local
vars:
f5_server: "{{ your_f5_server }}"
f5_username: "{{ your_f5_username }}"
f5_password: "{{ your_f5_password }}"
csr_name: "{{ your_csr_name }}"
csr_common_name: "{{ your_csr_common_name }}"
csr_subject_alternative_names:
- "{{ your_csr_sans }}"
csr_key_size: "{{ your_csr_key_size }}"
csr_key_type: "{{ your_csr_key_type }}"
csr_algorithm: "{{ your_csr_algorithm }}"
csr_key_password: "{{ your_csr_key_password }}"
tasks:
- name: Generate CSR
bigip_device_certificate_csr:
provider:
server: "{{ f5_server }}"
user: "{{ f5_username }}"
password: "{{ f5_password }}"
validate_certs: no
name: "{{ csr_name }}"
common_name: "{{ csr_common_name }}"
subject_alternative_names: "{{ csr_subject_alternative_names }}"
key_size: "{{ csr_key_size }}"
key_type: "{{ csr_key_type }}"
algorithm: "{{ csr_algorithm }}"
key_password: "{{ csr_key_password }}"
register: csr_result
ERROR! couldn't resolve module/action 'bigip_device_certificate_csr'. This often indicates a misspelling, missing collection, or incorrect module path.
Please help. Thanks