mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2024-12-12 14:00:18 +01:00
fix(alpine): testing in molecule and rename service
This commit is contained in:
parent
910b611058
commit
5f560137f4
6 changed files with 7 additions and 17 deletions
|
@ -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
|
||||
|
||||
|
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue