update step-ca role
This commit is contained in:
1 parent
94feea5298
commit
7f8ed555e8
2 files changed
+31
-22
No files matched your search
+31
-16
@@ -45,8 +45,8 @@
|
||||
backup: no
|
||||
remote_src: yes
|
||||
with_items:
|
||||
- { src: "/opt/ansiblepackages/step_0.15.16/bin/step", dst: "/bin/step" }
|
||||
- { src: "/opt/ansiblepackages/step-ca_0.15.15/bin/step-ca", dst: "/bin/step-ca" }
|
||||
- { src: "/opt/ansiblepackages/step_0.15.16/bin/step", dst: "/usr/bin/step" }
|
||||
- { src: "/opt/ansiblepackages/step-ca_0.15.15/bin/step-ca", dst: "/usr/bin/step-ca" }
|
||||
|
||||
- name: create user for step-ca
|
||||
user:
|
||||
@@ -65,6 +65,11 @@
|
||||
group: step
|
||||
mode: "0770"
|
||||
|
||||
- name: init step-ca
|
||||
command: sudo -u step step ca init -ssh --name="{{ pki_name }}" --dns {{ ansible_hostname }} --issuer="{{ pki_name }}" --address=:4343 --provisioner="{{ pki_name }}" --password-file=/etc/step-ca/password.txt --provisioner-password-file=/etc/step-ca/password.txt
|
||||
args:
|
||||
creates: /etc/step-ca/.step/config
|
||||
|
||||
- name: set permissions correct
|
||||
file:
|
||||
dest: /etc/step-ca
|
||||
@@ -73,20 +78,6 @@
|
||||
mode: "0770"
|
||||
recurse: yes
|
||||
|
||||
- name: init step-ca
|
||||
command: sudo -u step step ca init -ssh --name="{{ pki_name }}" --dns {{ ansible_hostname }} --issuer="{{ pki_name }}" --address=:4343 --provisioner="{{ pki_name }}" --password-file=/etc/step-ca/password.txt --provisioner-password-file=/etc/step-ca/password.txt
|
||||
args:
|
||||
creates: /etc/step-ca/.step/config
|
||||
|
||||
- name: correct badgerValueLogLoadingMode
|
||||
lineinfile:
|
||||
path: /etc/step-ca/.step/config/ca.json
|
||||
line: "{{'\t'}}{{'\t'}},\"badgerValueLogLoadingMode\": \"FileIO\""
|
||||
state: present
|
||||
insertafter: "{{'\t'}}{{'\t'}}\"badgerFileLoadingMode\": \"\""
|
||||
notify:
|
||||
- restart step-ca
|
||||
|
||||
- name: generate /etc/systemd/system/step-ca.service
|
||||
template:
|
||||
src: step-ca.service.j2
|
||||
@@ -97,6 +88,30 @@
|
||||
notify:
|
||||
- reload systemd
|
||||
|
||||
- name: correct ca.json step 1
|
||||
lineinfile:
|
||||
path: /etc/step-ca/.step/config/ca.json
|
||||
line: "{{'\t'}}{{'\t'}}\"type\": \"badgerV2\","
|
||||
state: present
|
||||
regexp: "^{{'\t'}}{{'\t'}}\"type\": \"badger\","
|
||||
notify:
|
||||
- restart step-ca
|
||||
|
||||
- name: correct ca.json step 2
|
||||
lineinfile:
|
||||
path: /etc/step-ca/.step/config/ca.json
|
||||
line: "{{'\t'}}{{'\t'}}\"badgerFileLoadingMode\": \"FileIO\""
|
||||
state: present
|
||||
regexp: "^{{'\t'}}{{'\t'}}\"badgerFileLoadingMode\":"
|
||||
notify:
|
||||
- restart step-ca
|
||||
|
||||
# "db": {
|
||||
# "type": "badgerV2",
|
||||
# "dataSource": "/etc/step-ca/.step/db",
|
||||
# "badgerFileLoadingMode": "FileIO"
|
||||
# },
|
||||
|
||||
- name: Flush handlers
|
||||
meta: flush_handlers
|
||||
|
||||
|
||||
Reference in new issue
Block a user