~xenrox/ansible

f9f9a1078a40d7972c37b6de7f6b5d163e3a5bc1 — Thorben Günther 20 days ago b3c269e
molecule: Improve prepare playbook

1. Refactor to use logical blocks
2. Add Arch Linux keyring setup
1 files changed, 18 insertions(+), 8 deletions(-)

M molecule/default/prepare.yml
M molecule/default/prepare.yml => molecule/default/prepare.yml +18 -8
@@ 2,12 2,22 @@
- name: prepare hosts
  hosts: all
  tasks:
    - name: install openssh
      ansible.builtin.package:
        name: openssh
        state: present
    - name: Setup openssh
      block:
        - name: Install
          ansible.builtin.package:
            name: openssh
            state: present

    - name: start openssh # for host keys
      ansible.builtin.systemd:
        name: sshd
        state: started
        - name: Start # for host keys
          ansible.builtin.systemd:
            name: sshd
            state: started

    - name: Setup Arch Linux keyring
      block:
        - name: Init
          ansible.builtin.command: pacman-key --init

        - name: Populate
          ansible.builtin.command: pacman-key --populate archlinux