@@ -113,12 +113,16 @@ jobs:
113113 - run : apt install -y jq
114114 - run : mkdir -p $WORKDIR
115115 - run : cp -a ./ $WORKDIR
116-
116+ # A few files are not an example playbook:
117+ # hypercore_inventory.yml - inventory example
118+ # cloud-init-user-data-example.yml - cloud-init user-data example
117119 - id : set-matrix
118120 shell : bash
119121 run : |-
120122 echo "matrix=$(
121- ls -r $WORKDIR/examples | jq -R -s -c 'split("\n")[:-1]'
123+ ls -r $WORKDIR/examples |
124+ grep -v -E "^README.md$|^hypercore_inventory.yml$|^cloud-init-user-data-example.yml$" |
125+ jq -R -s -c 'split("\n")[:-1]'
122126 )" >> $GITHUB_OUTPUT
123127 if : " ${{ github.event.inputs || github.event.schedule }}"
124128
@@ -140,11 +144,12 @@ jobs:
140144 - run : pip3 install -r sanity.requirements -r test.requirements -r docs.requirements
141145 - run : apt update
142146 - run : apt install -y git make
143- - run : apt install -y genisoimage qemu-utils
147+ - run : apt install -y genisoimage qemu-utils jq
148+ - run : pip install yq
144149 - run : pip install ansible-core~=${{ matrix.ansible }}
145150 - run : mkdir -p $WORKDIR
146151 - run : cp -a ./ $WORKDIR
147- - run : cd $WORKDIR && ansible-galaxy collection install community.crypto
152+ - run : cd $WORKDIR && ansible-galaxy collection install community.crypto community.general
148153 - run : cd $WORKDIR && ansible-galaxy collection list
149154 - run : |
150155 cd $WORKDIR
@@ -154,7 +159,13 @@ jobs:
154159 echo "smb_password: ${{ secrets.CI_CONFIG_HC_IP50_SMB_PASSWORD }}" >> tests/integration/integration_config.yml
155160 echo "sc_replication_dest_password: ${{ secrets.CI_CONFIG_HC_IP50_SC_REPLICATION_DEST_PASSWORD }}" >> tests/integration/integration_config.yml
156161 ls -al tests/integration/integration_config.yml
157- - run : cd $WORKDIR && ansible-playbook --check ${{ matrix.example_name }}
162+ - run : |
163+ cd $WORKDIR
164+ eval export SC_HOST=$(cat tests/integration/integration_config.yml | yq '.sc_host')
165+ eval export SC_USERNAME=$(cat tests/integration/integration_config.yml | yq '.sc_username')
166+ eval export SC_PASSWORD=$(cat tests/integration/integration_config.yml | yq '.sc_password')
167+ eval export SC_TIMEOUT=$(cat tests/integration/integration_config.yml | yq '.sc_timeout')
168+ ansible-playbook --check examples/${{ matrix.example_name }}
158169
159170 integ :
160171 needs :
0 commit comments