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 <lmilbaum@redhat.com>
  • Loading branch information
lmilbaum committed May 4, 2024
1 parent 74c81b7 commit a56f629
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
9 changes: 7 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 @@ -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: |
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'
21 changes: 9 additions & 12 deletions training/provision/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a56f629

Please sign in to comment.