--- ################################################################################ # Created Date: Sunday December 21st 2025 # Author: Aaron Johnson aaron.johnson@akamai.com # ----- # Last Modified: Tuesday, 24th February 2026 # Modified By: the engineer formerly known as Aaron Johnson # ----- # Copyright (c) 2025 Contact Author for details # ----- # USAGE/DOCUMENTATION: # # ----- # INSTALLATION # # ----- # HISTORY: # Date By Comments # ---------- --- --------------------------------------------------------- ################################################################################ - name: Install certificate and generate PKCS#12 for Plex become_user: "{{ acme_user }}" shell: | {{ acme_sh_path }} --install-cert \ -d {{ inventory_hostname }} \ --key-file {{ cert_dir }}/privkey.pem \ --fullchain-file {{ cert_dir }}/fullchain.pem \ --reloadcmd " chmod 640 {{ cert_dir }}/privkey.pem {{ cert_dir }}/fullchain.pem && openssl pkcs12 -export \ -inkey {{ cert_dir }}/privkey.pem \ -in {{ cert_dir }}/fullchain.pem \ -out {{ cert_dir }}/{{ inventory_hostname }}.p12 \ -password pass:{{ pkcs12_password | default('ChangeMe123!') }} && sudo systemctl restart {{ plex_service | default('plex') }} " args: creates: "{{ cert_dir }}/{{ inventory_hostname }}.p12"