Skip to content

Commit

Permalink
Also replace short module names for FQCNs in blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Feb 22, 2021
1 parent d987efc commit 581b905
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
- name: create root ca
block:
- name: set path for root CA
set_fact:
ansible.builtin.set_fact:
ca_path: "{{ ca_openssl_path }}/{{ ca_common_name }}/rootCA"
ca_filename: rootCA

- name: init root CA
include_tasks: init_ca.yml
ansible.builtin.include_tasks: init_ca.yml
when:
- ca_init | bool
- ca_own_root | bool
Expand All @@ -27,10 +27,10 @@
- name: create ca
block:
- name: init CA
include_tasks: init_ca.yml
ansible.builtin.include_tasks: init_ca.yml

- name: generate ca certificates
include_tasks: generate_ca_certs.yml
ansible.builtin.include_tasks: generate_ca_certs.yml
when:
- ca_own_root | bool
when:
Expand Down
10 changes: 5 additions & 5 deletions tasks/requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# issue
- block:
- name: upload requested key
copy:
ansible.builtin.copy:
src: "{{ request.upload_keyfile }}"
dest: "{{ ca_path }}/{{ ca_subject_keys_path }}/{{ request.name | default(request) }}.pem"
mode: "0644"
when:
- request.upload_keyfile is defined

- name: copy requested key
copy:
ansible.builtin.copy:
remote_src: yes
src: "{{ request.keyfile_path }}"
dest: "{{ ca_path }}/{{ ca_subject_keys_path }}/{{ request.name | default(request) }}.pem"
Expand Down Expand Up @@ -39,7 +39,7 @@
organizational_unit_name: "{{ request.organizational_unit_name | default(omit) }}"

- name: generate requested certificate extension file
template:
ansible.builtin.template:
src: extensions.cnf.j2
dest: "{{ ca_path }}/{{ ca_extfiles_path }}/{{ request.name | default(request) }}.cnf"
mode: "0644"
Expand All @@ -51,7 +51,7 @@
creates: "{{ ca_path }}/{{ ca_certs_path }}/{{ request.name | default(request) }}.crt"

- name: publish certificate
copy:
ansible.builtin.copy:
src: "{{ ca_path }}/{{ ca_certs_path }}/{{ request.name | default(request) }}.crt"
dest: "{{ ca_publication_location }}/{{ request.name | default(request) }}.crt"
mode: "644"
Expand Down Expand Up @@ -80,7 +80,7 @@
cmd: "openssl ca {{ ca_crl_params }}"

- name: ensure certificate file is absent
file:
ansible.builtin.file:
path: "{{ ca_path }}/{{ ca_certs_path }}/{{ request.name | default(request) }}.crt"
state: absent
when:
Expand Down

0 comments on commit 581b905

Please sign in to comment.