Commit e58b6ae5 authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

tasks

parent 35392618
Loading
Loading
Loading
Loading

tasks/main.yml

0 → 100644
+28 −0
Original line number Diff line number Diff line
---

- name: Create a directory for LE CA certs
  ansible.builtin.file:
    path: /tmp/letsencrypt
    state: directory
    mode: '0750'

- name: Download LE CA certs
  ansible.builtin.get_url:
    url: "https://letsencrypt.org/certs/{{ item }}"
    dest: "/tmp/letsencrypt/{{ item }}"
    mode: '0640'
  with_items: "{{ le_ca_certs | list }}"

- name: Install LE CA certs
  ansible.builtin.shell: ipa-cacert-manage install "/tmp/letsencrypt/{{ item }}"
  changed_when: False
  with_items: "{{ le_ca_certs | list }}"

- name: Delete directory for LE CA certs
  ansible.builtin.file:
    path: /tmp/letsencrypt
    state: absent

- name: Update IPA certs
  ansible.builtin.shell: ipa-certupdate
  changed_when: False