diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 7cbf942..25f84d5 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -14,12 +14,12 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && python3 -m pip install pip --upgrade \ && python3 -m pip install -r /tmp/molecule/requirements.txt -RUN useradd -m vscode && \ +RUN useradd -s /bin/bash -m vscode && \ usermod -aG docker vscode && \ echo 'vscode ALL=(ALL:ALL) NOPASSWD: ALL' > /etc/sudoers.d/vscode && \ echo 'source /etc/bash_completion.d/git-prompt' >> /home/vscode/.bashrc && \ echo 'sudo chown vscode /var/run/docker-host.sock' >> /home/vscode/.bashrc && \ - echo 'export PS1="${PS1}\[\033[38;5;196m\]$(__git_ps1)\[$(tput sgr0)\] "' >> /home/vscode/.bashrc + echo 'export PS1="${PS1:0:-1}\[\033[38;5;196m\]$(__git_ps1)\[$(tput sgr0)\] "' >> /home/vscode/.bashrc RUN ln -s /var/run/docker-host.sock /var/run/docker.sock diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bc2fa0..8b57a25 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: prebuilt: 'true' - distro: geerlingguy/docker-fedora33-ansible:latest scenario: autodeploy - - distro: nimmis/alpine:3.14 + - distro: xanmanning/docker-alpine-ansible:3.16 scenario: highavailabilityetcd command: "init" prebuilt: 'false' diff --git a/meta/main.yml b/meta/main.yml index d276bf0..89958fb 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -38,6 +38,9 @@ galaxy_info: # platforms is a list of platforms, and each platform has a name and a list of versions. # platforms: + - name: Alpine + versions: + - all - name: Archlinux versions: - all diff --git a/tasks/ensure_cluster.yml b/tasks/ensure_cluster.yml index 78943b7..938c463 100644 --- a/tasks/ensure_cluster.yml +++ b/tasks/ensure_cluster.yml @@ -61,21 +61,10 @@ become: "{{ k3s_become }}" - name: Ensure secondary controllers are started - ansible.builtin.systemd: - name: k3s - state: started - enabled: "{{ k3s_start_on_boot }}" - register: ensure_secondary_controllers_started - failed_when: - - ensure_secondary_controllers_started is not succeeded - - not ansible_check_mode - until: ensure_secondary_controllers_started is succeeded - retries: "{{ ansible_play_hosts | length }}" - delay: 5 + include_tasks: ensure_control_plane_started_{{ ansible_service_mgr }}.yml when: - k3s_control_node - not k3s_primary_control_node - become: "{{ k3s_become }}" - import_tasks: post_checks_control_plane.yml when: not k3s_skip_validation diff --git a/tasks/ensure_control_plane_started_sysvinit.yml b/tasks/ensure_control_plane_started_openrc.yml similarity index 100% rename from tasks/ensure_control_plane_started_sysvinit.yml rename to tasks/ensure_control_plane_started_openrc.yml diff --git a/vars/main.yml b/vars/main.yml index 0777b30..303f2a8 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -18,7 +18,6 @@ k3s_valid_states: # Supported init systems k3s_supported_init: - systemd - - sysvinit # Possibly what openrc identifies as in Ansible? - openrc # Map ansible fact gathering architecture to a release name and suffix in github. @@ -99,7 +98,6 @@ k3s_logrotate_dir: /etc/logrotate.d # Service handler k3s_service_handler: systemd: systemd - sysvinit: service openrc: service # Data directory location for k3s