mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2024-11-05 13:23:30 +01:00
Update test sequence for check mode, fixed check mode on cgroup test
This commit is contained in:
parent
60da06e137
commit
f4fcd2897d
10 changed files with 140 additions and 9 deletions
15
CHANGELOG.md
15
CHANGELOG.md
|
@ -14,6 +14,21 @@
|
|||
---
|
||||
-->
|
||||
|
||||
## 2021-04-18, v2.8.3
|
||||
|
||||
### Notable changes
|
||||
|
||||
- Typo fix in README.md #110
|
||||
- Fixed check mode for cgroup test #111
|
||||
- Added check mode into molecule test sequence
|
||||
- `inventory.yml` is now `blockinfile`
|
||||
|
||||
### Contributors
|
||||
|
||||
- [@bdronneau](https://github.com/bdronneau)
|
||||
|
||||
---
|
||||
|
||||
## 2021-04-10, v2.8.2
|
||||
|
||||
### Notable changes
|
||||
|
|
|
@ -4,6 +4,22 @@ dependency:
|
|||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
scenario:
|
||||
test_sequence:
|
||||
- dependency
|
||||
- lint
|
||||
- cleanup
|
||||
- destroy
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- check
|
||||
- converge
|
||||
- idempotence
|
||||
- side_effect
|
||||
- verify
|
||||
- cleanup
|
||||
- destroy
|
||||
lint: |
|
||||
set -e
|
||||
yamllint -s .
|
||||
|
|
|
@ -4,6 +4,22 @@ dependency:
|
|||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
scenario:
|
||||
test_sequence:
|
||||
- dependency
|
||||
- lint
|
||||
- cleanup
|
||||
- destroy
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- check
|
||||
- converge
|
||||
- idempotence
|
||||
- side_effect
|
||||
- verify
|
||||
- cleanup
|
||||
- destroy
|
||||
lint: |
|
||||
set -e
|
||||
yamllint -s .
|
||||
|
|
|
@ -4,6 +4,22 @@ dependency:
|
|||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
scenario:
|
||||
test_sequence:
|
||||
- dependency
|
||||
- lint
|
||||
- cleanup
|
||||
- destroy
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- check
|
||||
- converge
|
||||
- idempotence
|
||||
- side_effect
|
||||
- verify
|
||||
- cleanup
|
||||
- destroy
|
||||
lint: |
|
||||
set -e
|
||||
yamllint -s .
|
||||
|
|
|
@ -4,6 +4,22 @@ dependency:
|
|||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
scenario:
|
||||
test_sequence:
|
||||
- dependency
|
||||
- lint
|
||||
- cleanup
|
||||
- destroy
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- check
|
||||
- converge
|
||||
- idempotence
|
||||
- side_effect
|
||||
- verify
|
||||
- cleanup
|
||||
- destroy
|
||||
lint: |
|
||||
set -e
|
||||
yamllint -s .
|
||||
|
|
|
@ -4,6 +4,22 @@ dependency:
|
|||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
scenario:
|
||||
test_sequence:
|
||||
- dependency
|
||||
- lint
|
||||
- cleanup
|
||||
- destroy
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- check
|
||||
- converge
|
||||
- idempotence
|
||||
- side_effect
|
||||
- verify
|
||||
- cleanup
|
||||
- destroy
|
||||
lint: |
|
||||
set -e
|
||||
yamllint -s .
|
||||
|
|
|
@ -4,6 +4,22 @@ dependency:
|
|||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
scenario:
|
||||
test_sequence:
|
||||
- dependency
|
||||
- lint
|
||||
- cleanup
|
||||
- destroy
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- check
|
||||
- converge
|
||||
- idempotence
|
||||
- side_effect
|
||||
- verify
|
||||
- cleanup
|
||||
- destroy
|
||||
lint: |
|
||||
set -e
|
||||
yamllint -s .
|
||||
|
|
|
@ -4,6 +4,22 @@ dependency:
|
|||
name: galaxy
|
||||
driver:
|
||||
name: docker
|
||||
scenario:
|
||||
test_sequence:
|
||||
- dependency
|
||||
- lint
|
||||
- cleanup
|
||||
- destroy
|
||||
- syntax
|
||||
- create
|
||||
- prepare
|
||||
- check
|
||||
- converge
|
||||
- idempotence
|
||||
- side_effect
|
||||
- verify
|
||||
- cleanup
|
||||
- destroy
|
||||
lint: |
|
||||
set -e
|
||||
yamllint -s .
|
||||
|
|
|
@ -62,22 +62,25 @@
|
|||
- k3s_build_cluster
|
||||
|
||||
- name: Ensure ansible_host is mapped to inventory_hostname
|
||||
ansible.builtin.lineinfile:
|
||||
ansible.builtin.blockinfile:
|
||||
path: /tmp/inventory.txt
|
||||
line: >-
|
||||
{{ item }}
|
||||
block: |
|
||||
{% for host in ansible_play_hosts_all %}
|
||||
{% filter replace('\n', ' ') %}
|
||||
{{ host }}
|
||||
@@@
|
||||
{{ hostvars[item].ansible_host | default(hostvars[item].ansible_fqdn) }}
|
||||
{{ hostvars[host].ansible_host | default(hostvars[host].ansible_fqdn) }}
|
||||
@@@
|
||||
C_{{ hostvars[item].k3s_control_node }}
|
||||
C_{{ hostvars[host].k3s_control_node }}
|
||||
@@@
|
||||
P_{{ hostvars[item].k3s_primary_control_node | default(False) }}
|
||||
P_{{ hostvars[host].k3s_primary_control_node | default(False) }}
|
||||
{% endfilter %}
|
||||
@@@ END:{{ host }}
|
||||
{% endfor %}
|
||||
create: true
|
||||
regexp: "^{{ item }} @@@ {{ hostvars[item].ansible_host | default(hostvars[item].ansible_fqdn) }}"
|
||||
mode: 0600
|
||||
loop: "{{ ansible_play_hosts_all }}"
|
||||
check_mode: false
|
||||
when: hostvars[item].k3s_control_node is defined
|
||||
when: k3s_control_node is defined
|
||||
|
||||
- name: Delegate an initializing control plane node
|
||||
block:
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
cmd: 'grep -E "^{{ cgroup.name }}\s+.*\s+1$" /proc/cgroups'
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
check_mode: false
|
||||
register: k3s_check_cgroup_option
|
||||
|
||||
- name: Fail if {{ cgroup.name }} cgroup is not enabled
|
||||
|
|
Loading…
Reference in a new issue