Revert "pki: fix conventions and idioms"

This reverts commit dfe2448e86.

Implementation too inflexible. Try again!
This commit is contained in:
Brice Waegeneire 2023-09-21 16:56:01 +02:00
parent dfe2448e86
commit 4c91f424c6
1 changed files with 5 additions and 7 deletions

View File

@ -6,29 +6,27 @@
apt:
name: python-cryptography
state: present
when: ansible_python_version is version('3', '<')
when: ansible_python['executable'] == "/usr/bin/python"
- name: Install python 3 cryptography
apt:
name: python3-cryptography
state: present
when: ansible_python_version is version('3', '>=')
when: ansible_python['executable'] == "/usr/bin/python3"
- name: Creates PKI tree directories
file:
path: "{{ item }}"
mode: "0700"
mode: 0700
state: directory
loop:
- "{{ pki_dir }}/certs"
- "{{ pki_dir }}/private"
# Create Certificate Authority (CA)
# Create Certificat Authority (CA)
- include: ca.yml
when:
- not ansible_check_mode
- inventory_hostname == pki_ca_host
when: inventory_hostname == pki_ca_host and not ansible_check_mode
# Create a certificate signed by the CA