Skip to content

Commit

Permalink
Reboot instance after bootc install
Browse files Browse the repository at this point in the history
Signed-off-by: Liora Milbaum <[email protected]>
  • Loading branch information
lmilbaum committed May 4, 2024
1 parent 74c81b7 commit 6ec3cab
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/training-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- main
paths:
- .github/workflows/training-e2e.yaml
- training
- ./training/**

workflow_dispatch:

Expand Down Expand Up @@ -89,11 +89,17 @@ jobs:
-i terraform-test-environment-module/hosts.ini \
--private-key=terraform-test-environment-module/${{ steps.terraform-output.outputs.pem_filename }} \
--extra-vars "image_name=${{ matrix.image_name }}" \
--extra-vars "host_name"=${{ steps.terraform-output.outputs.url }}" \
--extra-vars "ssh_public_key='${{ steps.terraform-output.outputs.ssh_public_key }}'" \
--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: |
Expand Down
2 changes: 2 additions & 0 deletions training/provision/ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[ssh_connection]
ssh_args = '-o StrictHostKeyChecking=no'
22 changes: 10 additions & 12 deletions training/provision/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,14 @@
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: "{{ host_name }}"
state: absent

- name: Reboot
ansible.builtin.reboot:
test_command: which ilab
vars:
remote_user: root

0 comments on commit 6ec3cab

Please sign in to comment.