diff --git a/.github/workflows/training-e2e.yaml b/.github/workflows/training-e2e.yaml index 5d680e76..a4923358 100644 --- a/.github/workflows/training-e2e.yaml +++ b/.github/workflows/training-e2e.yaml @@ -10,7 +10,7 @@ on: - main paths: - .github/workflows/training-e2e.yaml - - training + - ./training/** workflow_dispatch: @@ -93,7 +93,12 @@ jobs: --extra-vars "registry_user=${{ secrets.REGISTRY_USER }}" \ --extra-vars "registry_password=${{ secrets.REGISTRY_PASSWORD }}" env: - ANSIBLE_HOST_KEY_CHECKING: false + ANSIBLE_CONFIG: ./main/training/provision/ansible.cfg + + # - name: Check Connectivity + # run: ssh -o StrictHostKeyChecking=no \ + # -i terraform-test-environment-module/${{ steps.terraform-output.outputs.pem_filename }} \ + # root@${{ steps.terraform-output.outputs.url }} which ilab # - name: run the e2e tests # run: | diff --git a/training/provision/ansible.cfg b/training/provision/ansible.cfg new file mode 100644 index 00000000..00deea95 --- /dev/null +++ b/training/provision/ansible.cfg @@ -0,0 +1,2 @@ +[ssh_connection] +ssh_args = '-o StrictHostKeyChecking=no' diff --git a/training/provision/playbook.yml b/training/provision/playbook.yml index 6046d413..d1723c4d 100644 --- a/training/provision/playbook.yml +++ b/training/provision/playbook.yml @@ -65,16 +65,13 @@ until: job_result.finished retries: 100 delay: 10 - - # - name: List images - # register: list_result - # ansible.builtin.shell: | - # podman images - - # - ansible.builtin.debug: msg="{{ list_result }}" - # - name: Restart instance - # ansible.builtin.reboot: - # test_command: which ilab - # # vars: - # # remote_user: root + - name: Remove the host from the known_host file + ansible.builtin.known_hosts: + name: "{{ inventory_hostname }}" + state: absent + delegate_to: localhost + + - name: Reboot + ansible.builtin.shell: systemctl reboot + ignore_errors: true