File tree 4 files changed +21
-0
lines changed
4 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,10 @@ jobs:
242
242
sudo modprobe kvm
243
243
# `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
244
244
sudo chown $(whoami) /dev/kvm
245
+ - name : Install ansible-playbook
246
+ run : |
247
+ sudo apt-get install -y --no-install-recommends ansible
248
+ if : matrix.template == '../hack/test-templates/test-misc.yaml'
245
249
- name : " Show cache"
246
250
run : ./hack/debug-cache.sh
247
251
- name : " Test"
Original file line number Diff line number Diff line change
1
+ - hosts : all
2
+ tasks :
3
+ - name : Create test file
4
+ file :
5
+ path : /tmp/ansible
6
+ state : touch
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ declare -A CHECKS=(
35
35
[" disk" ]=" "
36
36
[" user-v2" ]=" "
37
37
[" mount-path-with-spaces" ]=" "
38
+ [" provision-ansible" ]=" "
38
39
)
39
40
40
41
case " $NAME " in
@@ -62,6 +63,7 @@ case "$NAME" in
62
63
CHECKS[" snapshot-online" ]=" 1"
63
64
CHECKS[" snapshot-offline" ]=" 1"
64
65
CHECKS[" mount-path-with-spaces" ]=" 1"
66
+ CHECKS[" provision-ansible" ]=" 1"
65
67
;;
66
68
" net-user-v2" )
67
69
CHECKS[" port-forwards" ]=" "
@@ -143,6 +145,11 @@ if [[ -n ${CHECKS["mount-path-with-spaces"]} ]]; then
143
145
[ " $( limactl shell " $NAME " cat " /tmp/lima test dir with spaces/test file" ) " = " test file content" ]
144
146
fi
145
147
148
+ if [[ -n ${CHECKS["provision-ansible"]} ]]; then
149
+ INFO ' Testing that /tmp/ansible was created successfully on provision'
150
+ limactl shell " $NAME " test -e /tmp/ansible
151
+ fi
152
+
146
153
INFO " Testing proxy settings are imported"
147
154
got=$( limactl shell " $NAME " env | grep FTP_PROXY)
148
155
# Expected: FTP_PROXY is set in addition to ftp_proxy, localhost is replaced
Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ mounts:
26
26
- location : " /tmp/lima"
27
27
writable : true
28
28
29
+ provision :
30
+ - mode : ansible
31
+ playbook : ./hack/ansible-test.yaml
32
+
29
33
# in order to use this example, you must first create the disk "data". run:
30
34
# $ limactl disk create data --size 10G
31
35
additionalDisks :
You can’t perform that action at this time.
0 commit comments