mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2024-12-05 02:40:19 +01:00
Converting molecule tests to v3
This commit is contained in:
parent
4b4a49bdd5
commit
57f9631265
6 changed files with 14 additions and 17 deletions
|
@ -46,7 +46,7 @@ env:
|
|||
|
||||
install:
|
||||
# Install test dependencies.
|
||||
- pip install molecule==2.22 docker jmespath
|
||||
- pip install molecule[docker] docker jmespath ansible-lint
|
||||
|
||||
before_script:
|
||||
# Use actual Ansible Galaxy role name for the project directory.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
---
|
||||
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
|
|
|
@ -4,8 +4,10 @@ dependency:
|
|||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
ansible-lint
|
||||
platforms:
|
||||
- name: node1
|
||||
image: "${MOLECULE_DISTRO:-geerlingguy/docker-centos8-ansible:latest}"
|
||||
|
@ -38,12 +40,6 @@ provisioner:
|
|||
name: ansible
|
||||
options:
|
||||
verbose: true
|
||||
lint:
|
||||
name: ansible-lint
|
||||
playbooks:
|
||||
prepare: ${MOLECULE_PREPARE_PLAYBOOK:-prepare.yml}
|
||||
converge: ${MOLECULE_PLAYBOOK:-playbook.yml}
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
|
|
|
@ -20,3 +20,4 @@
|
|||
state: directory
|
||||
owner: k3suser
|
||||
group: user
|
||||
mode: 0700
|
||||
|
|
|
@ -4,8 +4,10 @@ dependency:
|
|||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
lint:
|
||||
name: yamllint
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
ansible-lint
|
||||
platforms:
|
||||
- name: node1
|
||||
image: "${MOLECULE_DISTRO:-geerlingguy/docker-centos8-ansible:latest}"
|
||||
|
@ -53,12 +55,6 @@ provisioner:
|
|||
name: ansible
|
||||
options:
|
||||
verbose: true
|
||||
lint:
|
||||
name: ansible-lint
|
||||
playbooks:
|
||||
prepare: ${MOLECULE_PREPARE_PLAYBOOK:-prepare.yml}
|
||||
converge: ${MOLECULE_PLAYBOOK:-playbook.yml}
|
||||
verifier:
|
||||
name: testinfra
|
||||
lint:
|
||||
name: flake8
|
||||
|
|
|
@ -16,11 +16,13 @@
|
|||
file:
|
||||
path: /usr/local/etc/haproxy
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: Ensure HAProxy is configured
|
||||
template:
|
||||
src: haproxy-loadbalancer.conf.j2
|
||||
dest: /usr/local/etc/haproxy/haproxy.cfg
|
||||
mode: 0644
|
||||
|
||||
- name: Ensure HAProxy service is started
|
||||
command: haproxy -D -f /usr/local/etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid
|
||||
|
|
Loading…
Reference in a new issue