pki: fix conventions and idioms
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2646|6|2640|6|:-1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/357//ansiblelint">Evolix » ansible-roles » unstable #357</a>
gitea/ansible-roles/pipeline/head This commit looks good
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2646|6|2640|6|:-1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/357//ansiblelint">Evolix » ansible-roles » unstable #357</a>
gitea/ansible-roles/pipeline/head This commit looks good
This commit is contained in:
parent
b5550d2ce2
commit
dfe2448e86
|
@ -6,27 +6,29 @@
|
||||||
apt:
|
apt:
|
||||||
name: python-cryptography
|
name: python-cryptography
|
||||||
state: present
|
state: present
|
||||||
when: ansible_python['executable'] == "/usr/bin/python"
|
when: ansible_python_version is version('3', '<')
|
||||||
|
|
||||||
- name: Install python 3 cryptography
|
- name: Install python 3 cryptography
|
||||||
apt:
|
apt:
|
||||||
name: python3-cryptography
|
name: python3-cryptography
|
||||||
state: present
|
state: present
|
||||||
when: ansible_python['executable'] == "/usr/bin/python3"
|
when: ansible_python_version is version('3', '>=')
|
||||||
|
|
||||||
- name: Creates PKI tree directories
|
- name: Creates PKI tree directories
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
mode: 0700
|
mode: "0700"
|
||||||
state: directory
|
state: directory
|
||||||
loop:
|
loop:
|
||||||
- "{{ pki_dir }}/certs"
|
- "{{ pki_dir }}/certs"
|
||||||
- "{{ pki_dir }}/private"
|
- "{{ pki_dir }}/private"
|
||||||
|
|
||||||
|
|
||||||
# Create Certificat Authority (CA)
|
# Create Certificate Authority (CA)
|
||||||
- include: ca.yml
|
- include: ca.yml
|
||||||
when: inventory_hostname == pki_ca_host and not ansible_check_mode
|
when:
|
||||||
|
- not ansible_check_mode
|
||||||
|
- inventory_hostname == pki_ca_host
|
||||||
|
|
||||||
|
|
||||||
# Create a certificate signed by the CA
|
# Create a certificate signed by the CA
|
||||||
|
|
Loading…
Reference in a new issue