mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
New module: manage Citrix Netscaler SSL certificate keys (network/netscaler/netscaler_ssl_certkey)) (#27641)
* Add netscaler_ssl_certkey * Fix options * Lowercase enabled, disabled option values * Add fixes in netscaler module utils needed for unit test success
This commit is contained in:
committed by
John R Barker
parent
7f8aaf97de
commit
cd865be987
@@ -0,0 +1,6 @@
|
||||
---
|
||||
testcase: "*"
|
||||
test_cases: []
|
||||
|
||||
nitro_user: nsroot
|
||||
nitro_pass: nsroot
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
[netscaler]
|
||||
|
||||
netscaler01 nsip=172.18.0.2 nitro_user=nsroot nitro_pass=nsroot
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
|
||||
- { include: nitro.yaml, tags: ['nitro'] }
|
||||
@@ -0,0 +1,14 @@
|
||||
- name: collect all nitro test cases
|
||||
find:
|
||||
paths: "{{ role_path }}/tests/nitro"
|
||||
patterns: "{{ testcase }}.yaml"
|
||||
register: test_cases
|
||||
|
||||
- name: set test_items
|
||||
set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
|
||||
|
||||
- name: run test case
|
||||
include: "{{ test_case_to_run }}"
|
||||
with_items: "{{ test_items }}"
|
||||
loop_control:
|
||||
loop_var: test_case_to_run
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
|
||||
- include: "{{ role_path }}/tests/nitro/certkey/setup.yaml"
|
||||
vars:
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
that: result|changed
|
||||
|
||||
- include: "{{ role_path }}/tests/nitro/certkey/setup.yaml"
|
||||
vars:
|
||||
check_mode: no
|
||||
|
||||
- assert:
|
||||
that: result|changed
|
||||
|
||||
- include: "{{ role_path }}/tests/nitro/certkey/setup.yaml"
|
||||
vars:
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
that: not result|changed
|
||||
|
||||
- include: "{{ role_path }}/tests/nitro/certkey/setup.yaml"
|
||||
vars:
|
||||
check_mode: no
|
||||
|
||||
- assert:
|
||||
that: not result|changed
|
||||
|
||||
- include: "{{ role_path }}/tests/nitro/certkey/remove.yaml"
|
||||
vars:
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
that: result|changed
|
||||
|
||||
- include: "{{ role_path }}/tests/nitro/certkey/remove.yaml"
|
||||
vars:
|
||||
check_mode: no
|
||||
|
||||
- assert:
|
||||
that: result|changed
|
||||
|
||||
- include: "{{ role_path }}/tests/nitro/certkey/remove.yaml"
|
||||
vars:
|
||||
check_mode: yes
|
||||
|
||||
- assert:
|
||||
that: not result|changed
|
||||
|
||||
- include: "{{ role_path }}/tests/nitro/certkey/remove.yaml"
|
||||
vars:
|
||||
check_mode: no
|
||||
|
||||
- assert:
|
||||
that: not result|changed
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
|
||||
- name: Setup cs action
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
check_mode: "{{ check_mode }}"
|
||||
netscaler_ssl_certkey:
|
||||
nitro_user: "{{nitro_user}}"
|
||||
nitro_pass: "{{nitro_pass}}"
|
||||
nsip: "{{nsip}}"
|
||||
|
||||
state: absent
|
||||
certkey: certirificate_1
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
|
||||
|
||||
- name: Setup cs action
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
check_mode: "{{ check_mode }}"
|
||||
netscaler_ssl_certkey:
|
||||
nitro_user: "{{nitro_user}}"
|
||||
nitro_pass: "{{nitro_pass}}"
|
||||
nsip: "{{nsip}}"
|
||||
|
||||
state: present
|
||||
|
||||
certkey: certirificate_1
|
||||
cert: server.crt
|
||||
key: server.key
|
||||
expirymonitor: enabled
|
||||
notificationperiod: 30
|
||||
inform: PEM
|
||||
password: False
|
||||
passplain: somesecret
|
||||
Reference in New Issue
Block a user