Files
playbook-sample/molecule/default/prepare.yml
ebesson e53a7da36c
All checks were successful
continuous-integration/drone/push Build is passing
feat: initial commit
2021-01-15 21:32:00 +01:00

42 lines
1.1 KiB
YAML

---
- name: Prepare
hosts: all
become: true
gather_facts: false
tasks:
- name: Install Python3 for Ansible
raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3-minimal sudo)
changed_when: false
- name: Install Mkcert
hosts: all
become: true
gather_facts: false
tasks:
- name: install curl
apt:
name: curl
state: present
update_cache: yes
- name: install libnss3-tools
apt:
name: libnss3-tools
state: present
update_cache: yes
- name: download and install mkcert
get_url:
url: https://github.com/FiloSottile/mkcert/releases/download/v1.4.1/mkcert-v1.4.1-linux-amd64
dest: /usr/local/bin/mkcert
mode: 0755
- name: install the local CA in the system trust store
shell: mkcert -install
- name: create certs directory
file:
path: /certs
state: directory
mode: 0755
- name: generate certificates
shell: mkcert -cert-file local-cert.pem -key-file local-key.pem "docker.localhost" "*.docker.localhost" "*.192.168.50.4"
args:
chdir: /certs