-
Notifications
You must be signed in to change notification settings - Fork 23
/
prepare.yml
52 lines (47 loc) · 1.16 KB
/
prepare.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
- hosts: ubuntu:debian
tasks:
- name: Update apt
apt:
update_cache: yes
- hosts: ca
tasks:
- name: Copy existing ca cert/key to nodes
copy:
src: "{{ item }}"
dest: /tmp/
owner: root
group: root
mode: 0755
loop:
- "existing.crt"
- "existing.key"
- name: Install step-ca
include_role:
name: step_ca
- name: Add ACME provisioner
maxhoesel.smallstep.step_ca_provisioner:
name: ACME
type: ACME
become: yes
become_user: "{{ step_ca_user }}"
- name: Reload step-ca
systemd:
name: step-ca
state: reloaded
- hosts: clients
tasks:
- name: Install nginx
package:
name: nginx
- name: Stop nginx
systemd:
name: nginx
state: stopped
enabled: no
- name: Bootstrap host
include_role:
name: maxhoesel.smallstep.step_bootstrap_host
vars:
step_bootstrap_ca_url: https://step-ca.localdomain
step_bootstrap_fingerprint: 345bf77397642dc9211a3820af0b1816c4afa430ad249ae705f1456b4bafa046
step_cli_steppath: /etc/step-cli-molecule