File tree Expand file tree Collapse file tree 4 files changed +21
-0
lines changed Expand file tree Collapse file tree 4 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,10 @@ jobs:
242242 sudo modprobe kvm
243243 # `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
244244 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'
245249 - name : " Show cache"
246250 run : ./hack/debug-cache.sh
247251 - 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=(
3535 [" disk" ]=" "
3636 [" user-v2" ]=" "
3737 [" mount-path-with-spaces" ]=" "
38+ [" provision-ansible" ]=" "
3839)
3940
4041case " $NAME " in
@@ -62,6 +63,7 @@ case "$NAME" in
6263 CHECKS[" snapshot-online" ]=" 1"
6364 CHECKS[" snapshot-offline" ]=" 1"
6465 CHECKS[" mount-path-with-spaces" ]=" 1"
66+ CHECKS[" provision-ansible" ]=" 1"
6567 ;;
6668" net-user-v2" )
6769 CHECKS[" port-forwards" ]=" "
@@ -143,6 +145,11 @@ if [[ -n ${CHECKS["mount-path-with-spaces"]} ]]; then
143145 [ " $( limactl shell " $NAME " cat " /tmp/lima test dir with spaces/test file" ) " = " test file content" ]
144146fi
145147
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+
146153INFO " Testing proxy settings are imported"
147154got=$( limactl shell " $NAME " env | grep FTP_PROXY)
148155# 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:
2626- location : " /tmp/lima"
2727 writable : true
2828
29+ provision :
30+ - mode : ansible
31+ playbook : ./hack/ansible-test.yaml
32+
2933# in order to use this example, you must first create the disk "data". run:
3034# $ limactl disk create data --size 10G
3135additionalDisks :
You can’t perform that action at this time.
0 commit comments