feat(systemd): added molecule tests for #164

This commit is contained in:
Xan Manning 2021-12-19 19:02:31 +00:00 committed by Curtis John
parent 582a696918
commit 9349c9456d
3 changed files with 9 additions and 0 deletions

View file

@ -18,5 +18,7 @@
k3s_server_manifests_urls:
- url: https://raw.githubusercontent.com/metallb/metallb/v0.9.6/manifests/namespace.yaml
filename: 05-metallb-namespace.yml
k3s_service_env_vars:
GOGC: 10
roles:
- role: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

View file

@ -10,6 +10,7 @@
datastore-endpoint: "postgres://postgres:verybadpass@database:5432/postgres?sslmode=disable"
k3s_agent:
snapshotter: native
k3s_service_env_file: /tmp/k3s.env
pre_tasks:
- name: Set each node to be a control node
ansible.builtin.set_fact:

View file

@ -37,3 +37,9 @@
ansible.builtin.apt:
update_cache: true
when: ansible_pkg_mgr == 'apt'
- name: Ensure environment file exists for k3s_service_env_file
ansible.builtin.lineinfile:
path: /tmp/k3s.env
line: "THISHOST={{ ansible_hostname }}"
mode: 0644