diff options
Diffstat (limited to 'molecule/archlinux')
| -rw-r--r-- | molecule/archlinux/Dockerfile.j2 | 24 | ||||
| -rw-r--r-- | molecule/archlinux/converge.yml | 33 | ||||
| -rw-r--r-- | molecule/archlinux/molecule.yml | 40 |
3 files changed, 97 insertions, 0 deletions
diff --git a/molecule/archlinux/Dockerfile.j2 b/molecule/archlinux/Dockerfile.j2 new file mode 100644 index 00000000..1d5a1cd5 --- /dev/null +++ b/molecule/archlinux/Dockerfile.j2 @@ -0,0 +1,24 @@ +FROM docker.io/library/archlinux + +ENV container docker + +RUN pacman -Syu --noconfirm --needed python3 \ + && pacman -Scc --noconfirm + +RUN (cd /lib/systemd/system/sysinit.target.wants/; \ + for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ + rm -f /lib/systemd/system/multi-user.target.wants/*;\ + rm -f /etc/systemd/system/*.wants/*;\ + rm -f /lib/systemd/system/local-fs.target.wants/*; \ + rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ + rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ + rm -f /lib/systemd/system/basic.target.wants/*;\ + rm -f /lib/systemd/system/anaconda.target.wants/*; + +# Workaround archlinux not including any non-indo-european locales +# https://gitlab.archlinux.org/archlinux/archlinux-docker/-/issues/59 +RUN cp -r /usr/share/i18n/locales/en_US /usr/share/i18n/locales/de_DE; + +VOLUME ["/sys/fs/cgroup"] + +CMD ["/lib/systemd/systemd"] diff --git a/molecule/archlinux/converge.yml b/molecule/archlinux/converge.yml new file mode 100644 index 00000000..228ab6d9 --- /dev/null +++ b/molecule/archlinux/converge.yml @@ -0,0 +1,33 @@ +--- +- name: Converge + hosts: archlinux + gather_facts: true + vars: + ansible_become_method: su + user_public_keys: + - "ssh-ed25519 AAAA...fMo" + - "ssh-rsa AAAA...4I3" + user_groups: ["wheel", "test_group"] + locales: + - "en_US.UTF-8 UTF-8" + timezone: "GMT" + + python_global_version: "3.13" + python_versions: + - "3.13" + roles: + - role: "hostname" + - role: "network" + - role: "user" + - role: "ssh" + - role: "password_policy" + - role: "locales" + - role: "timezone" + - role: "wireguard" + - role: "wireguard_gateway" + - role: "homebrew" + - role: "python" + - role: "go" + - role: "docker" + - role: "podman" + - role: "ansible" diff --git a/molecule/archlinux/molecule.yml b/molecule/archlinux/molecule.yml new file mode 100644 index 00000000..9fdd7912 --- /dev/null +++ b/molecule/archlinux/molecule.yml @@ -0,0 +1,40 @@ +--- +role_name_check: 1 +dependency: + name: galaxy + options: + ignore-errors: true +driver: + name: podman +platforms: + - name: archlinux + dockerfile: Dockerfile.j2 + platform: "linux/amd64" + pre_build_image: false + privileged: true + command: ${MOLECULE_COMMAND:-"/lib/systemd/systemd"} + tmpfs: + "/tmp": "rw" + "/run": "rw,exec" + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + cgroupns_mode: host + +provisioner: + name: ansible + inventory: + links: + host_vars: "../../host_vars/" + group_vars: "../../group_vars/" + env: + ANSIBLE_ROLES_PATH: "../../roles" + config_options: + defaults: + callback_result_format: yaml + interpreter_python: /usr/bin/python3 + ssh_connection: + pipelining: true + playbooks: + converge: converge.yml +verifier: + name: ansible |
