mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 21:54:30 +00:00
- Add gandalf.prole.org → 10.0.0.7 to prole_dns_records and prole_internal_a_records in dns.yml (was missing, causing nslookup to fail on myrddin) - prole_ssl: stat-check each source file on the controller before copying; emit a warning and skip rather than hard-failing when certs have not yet been placed in ssl/prole/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
949 B
YAML
32 lines
949 B
YAML
---
|
|
- name: Ensure Prole SSL directory exists
|
|
ansible.builtin.file:
|
|
path: "{{ prole_ssl_dest_dir }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
|
|
- name: Check which SSL source files exist on controller
|
|
ansible.builtin.stat:
|
|
path: "{{ prole_ssl_src_dir }}/{{ item }}"
|
|
loop: "{{ prole_ssl_files }}"
|
|
register: prole_ssl_stat
|
|
delegate_to: localhost
|
|
|
|
- name: Warn about missing SSL source files
|
|
ansible.builtin.debug:
|
|
msg: "WARNING: SSL source file not found on controller, skipping: {{ item.item }}"
|
|
loop: "{{ prole_ssl_stat.results }}"
|
|
when: not item.stat.exists
|
|
|
|
- name: Deploy Prole SSL files
|
|
ansible.builtin.copy:
|
|
src: "{{ prole_ssl_src_dir }}/{{ item.item }}"
|
|
dest: "{{ prole_ssl_dest_dir }}/{{ item.item }}"
|
|
owner: root
|
|
group: root
|
|
mode: "{{ '0600' if (item.item | regex_search('\\.key$')) else '0644' }}"
|
|
loop: "{{ prole_ssl_stat.results }}"
|
|
when: item.stat.exists
|