%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /etc/ansible/roles/web/tasks/
Upload File :
Create Path :
Current File : //etc/ansible/roles/web/tasks/configure_le_certificates_per_ntlm_site.yml

---
- name: delete default settings from apache config
  lineinfile:
    dest: "{{ item.ApacheConfNTLM }}"
    regexp: "SSLCertificate"
    state: absent
  with_items: "{{ bx_sites_info }}"
  when: item.ApacheConfNTLM != ""

- name: delete ansible settings from apache config
  bx_blockinfile: insertafter="CERTIFICATE ANSIBLE MANAGED BLOCK" state="delete"
    dest="{{ item.ApacheConfNTLM }}"
  with_items: "{{ bx_sites_info }}"
  when: item.ApacheConfNTLM != ""

- name: add new settings to apache config 
  blockinfile:
    dest: "{{ item.ApacheConfNTLM }}"
    insertafter: "SSLEngine"
    marker: "# CERTIFICATE ANSIBLE MANAGED BLOCK"
    content: |
      SSLCertificateFile   /home/bitrix/dehydrated/certs/{{ common_name.stdout }}/fullchain.pem
      SSLCertificateKeyFile  /home/bitrix/dehydrated/certs/{{ common_name.stdout }}/privkey.pem
  with_items: "{{ bx_sites_info }}"
  when: item.ApacheConfNTLM != ""


Zerion Mini Shell 1.0