Files @ 770551dc8c6f
Branch filter:

Location: majic-ansible-roles/roles/preseed/tasks/main.yml

branko
MAR-148: Improve the SSH connectivity tests in backup_server role to be more reliable:

- Introduce a session-level fixture for setting permissions for client
SSH private keys (fixes errors related to SSH requesting tighter
permissions).
- Add assertions for the tests that verify the backup clients cannot
connect to the regular SSH server in case the SSH private keys do
not have correct permissions (just in case).
---

- name: Create directory for storing preseed configurations
  file:
    path: "{{ preseed_directory }}"
    mode: 0750
    state: directory

- name: Create preseed configuration file
  template:
    src: "preseed.cfg.j2"
    dest: "{{ preseed_directory }}/{{ item }}.cfg"
    mode: 0640
  when: item != "localhost"
  with_items: "{{ groups['all'] }}"

- name: Explicitly run all handlers
  include: ../handlers/main.yml
  when: "run_handlers | default(False) | bool()"
  tags:
    - handlers