-
Notifications
You must be signed in to change notification settings - Fork 2
/
le-cert-resetlab.yml
70 lines (63 loc) · 1.88 KB
/
le-cert-resetlab.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
---
- name: Cert Management on BIG-IP
hosts: lb
connection: local
gather_facts: false
vars:
# below is the fip name that will be created, it should match the cert DNS name
F5_VIP_Name: testtest.gregsowell.com
provider:
server: ReplaceMe
# user: admin
# password: myveryspecialpassword
user: "{{ provider_user }}"
password: "{{ provider_pword }}"
server_port: 8443
validate_certs: "no"
tasks:
- name: UPDATE A VIRTUAL SERVER -done
bigip_virtual_server:
provider: "{{provider}}"
name: "{{ F5_VIP_Name }}_https_vip"
port: "8081"
profiles:
- name: "{{F5_VIP_Name}}_ClientSSL_profile"
context: client-side
- oneconnect
state: absent
- name: Create a client SSL profile with a cert/key/chain setting -done
bigip_profile_client_ssl:
provider: "{{provider}}"
state: absent
name: "{{F5_VIP_Name}}_ClientSSL_profile"
- name: SSL key upload -done
bigip_ssl_key:
provider: "{{provider}}"
name: "{{F5_VIP_Name}}_Key"
state: absent
#SSL Upload and Modification of VIP to use New Certificate
- name: SSL cert upload -done
bigip_ssl_certificate:
provider: "{{provider}}"
name: "{{F5_VIP_Name}}_Cert"
state: absent
- name: Create a HTTPS Virtual Server -done
bigip_virtual_server:
provider: "{{provider}}"
state: absent
name: "{{ F5_VIP_Name }}_https_vip"
when: F5_VIP_Name is defined
- name: Add Pool Members -done
bigip_pool_member:
provider: "{{provider}}"
state: absent
pool: "{{ F5_VIP_Name }}_pool"
name: "{{hostvars[item].inventory_hostname}}"
host: "{{hostvars[item].private_ip}}"
port: "80"
loop: "{{ groups['web'] }}"
- name: Create Pool with Members -done
bigip_pool:
provider: "{{provider}}"
state: absent
name: "{{ F5_VIP_Name }}_pool"