forked from ThalesGroup/CDSP-Orchestration-Ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfaceMgmtSample.yml
84 lines (71 loc) · 2.58 KB
/
interfaceMgmtSample.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#
# (c) 2023 Thales Group. All rights reserved.
# Author: Anurag Jain, Developer Advocate, Thales
#
---
- name: "Sample playbook for interacting with Interfaces on CipherTrust Manager"
hosts: localhost
connection: local
vars_files:
- vars/interfaceMgmt.yml
tasks:
- name: "Create Interface"
thalesgroup.ciphertrust.interface_save:
localNode: "{{ this_node_connection_string }}"
op_type: create
port: 9006
auto_registration: false
interface_type: nae
mode: no-tls-pw-opt
network_interface: all
register: interface
ignore_errors: true
- name: Paused for verifying trial license activation, press enter to continue
ansible.builtin.pause:
- name: "Patch Interface"
thalesgroup.ciphertrust.interface_save:
localNode: "{{ this_node_connection_string }}"
op_type: patch
interface_id: nae_all_9006
port: 9007
- name: "Add Cert to Interface"
thalesgroup.ciphertrust.interface_actions:
localNode: "{{ this_node_connection_string }}"
op_type: put_certificate
interface_id: "interface_identifier"
certificate: "cert_key_data"
format: PEM
- name: "Enable Interface"
thalesgroup.ciphertrust.interface_actions:
localNode: "{{ this_node_connection_string }}"
op_type: enable
interface_id: "interface_identifier"
- name: "Disable Interface"
thalesgroup.ciphertrust.interface_actions:
localNode: "{{ this_node_connection_string }}"
op_type: disable
interface_id: "interface_identifier"
- name: "Restore default TLS Ciphers"
thalesgroup.ciphertrust.interface_actions:
localNode: "{{ this_node_connection_string }}"
op_type: restore-default-tls-ciphers
interface_id: "interface_identifier"
- name: "Create CSR"
thalesgroup.ciphertrust.interface_actions:
localNode: "{{ this_node_connection_string }}"
op_type: csr
interface_id: "interface_identifier"
cn: "csr_cn"
- name: "Auto Generate Server Certificate"
thalesgroup.ciphertrust.interface_actions:
localNode: "{{ this_node_connection_string }}"
op_type: auto-gen-server-cert
interface_id: "interface_identifier"
- name: "Use certificate"
thalesgroup.ciphertrust.interface_actions:
localNode: "{{ this_node_connection_string }}"
op_type: use-certificate
interface_id: "interface_identifier"
copy_from: "Name_Source_Interface"
- name: Debug Output
debug: var=output