Jérémy Lecour
dfe2448e86
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
36 lines
771 B
YAML
36 lines
771 B
YAML
---
|
|
|
|
# Prerequisites
|
|
# TODO Python packages may need to be differente based on debian version
|
|
- name: Install python 2 cryptography
|
|
apt:
|
|
name: python-cryptography
|
|
state: present
|
|
when: ansible_python_version is version('3', '<')
|
|
|
|
- name: Install python 3 cryptography
|
|
apt:
|
|
name: python3-cryptography
|
|
state: present
|
|
when: ansible_python_version is version('3', '>=')
|
|
|
|
- name: Creates PKI tree directories
|
|
file:
|
|
path: "{{ item }}"
|
|
mode: "0700"
|
|
state: directory
|
|
loop:
|
|
- "{{ pki_dir }}/certs"
|
|
- "{{ pki_dir }}/private"
|
|
|
|
|
|
# Create Certificate Authority (CA)
|
|
- include: ca.yml
|
|
when:
|
|
- not ansible_check_mode
|
|
- inventory_hostname == pki_ca_host
|
|
|
|
|
|
# Create a certificate signed by the CA
|
|
- include: signed_certificate.yml
|