CA selection and register to the selected CA

This commit is contained in:
adns44 2024-09-13 18:30:39 +02:00
parent 1fd8d903b8
commit 6951fc4040
3 changed files with 28 additions and 2 deletions

View file

@ -12,5 +12,4 @@ All variables are in the defaults folder, however the most importants are:
- acme_sh_email: "example@example.com" # mail address with acme install - acme_sh_email: "example@example.com" # mail address with acme install
## todo ## todo
- Set and register the default CA
- Issue cert on domains - Issue cert on domains

View file

@ -15,3 +15,21 @@
--config-home {{ acme_sh_config_home | quote }} --config-home {{ acme_sh_config_home | quote }}
-m {{ acme_sh_email | quote }} -m {{ acme_sh_email | quote }}
creates: "{{ acme_sh_home }}" creates: "{{ acme_sh_home }}"
- name: Set CA
ansible.builtin.command:
chdir: "{{ acme_sh_home }}"
cmd: |
/bin/sh acme.sh
--config-home {{ acme_sh_config_home | quote }}
--set-default-ca
--server {{ acme_sh_default_ca_server | quote }}
- name: Register CA
ansible.builtin.command:
chdir: "{{ acme_sh_home }}"
cmd: |
/bin/sh acme.sh
--config-home {{ acme_sh_config_home | quote }}
--register-account

9
tasks/issue_cert.yml Normal file
View file

@ -0,0 +1,9 @@
- name: Register CA
ansible.builtin.command:
chdir: "{{ acme_sh_home }}"
cmd: |
/bin/sh acme.sh
--config-home {{ acme_sh_config_home | quote }}
--set-default-ca
--server {{ acme_sh_default_ca_server | quote }}