Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/actions/setup-vm-creds/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ inputs:
job-tag:
description:
Optional job tag to add to the ID
workspace:
default: ${{ github.workspace }}
description:
Optional path to the root of the collector repo
runs:
using: composite
steps:
Expand Down Expand Up @@ -103,9 +107,9 @@ runs:

- shell: bash
run: |
python -m pip install -r "${{ github.workspace }}/ansible/requirements.txt"
ansible-galaxy collection install -r "${{ github.workspace }}/ansible/requirements.yml"
ansible-galaxy collection install -r "${{ github.workspace }}/ansible/ansible-collections.yml"
python -m pip install -r "${{ inputs.workspace }}/ansible/requirements.txt"
ansible-galaxy collection install -r "${{ inputs.workspace }}/ansible/requirements.yml"
ansible-galaxy collection install -r "${{ inputs.workspace }}/ansible/ansible-collections.yml"

# Added workaround for ssh connection issue with power vm from ubuntu machine.
# Changing mtu works in resolving the issue
Expand Down
5 changes: 3 additions & 2 deletions ansible/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
collections:
- google.cloud
- community.general
- name: community.general
version: '>=10.1.0'
- community.docker
- containers.podman
- kubernetes.core
- ibm.cloudcollection
- ibm.cloudcollection
35 changes: 2 additions & 33 deletions ansible/roles/provision-vm/tasks/fedora-coreos.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,12 @@
---

#
# Fedora CoreOS does not have python installed by default
# but we can install it. The commands here are 'raw' and
# therefore are somewhat more dangerous than the safe ansible-wrapped
# commands via shell or cmd.
#


# Check for python first, because the following steps will fail if
# python already exists so we just skip them if it's there already
# (this is usually an indication that provisioning has run more than once,
# and is likely to only happen during dev)
- name: Check for python
raw: which python || true
args:
executable: /usr/bin/bash
register: which_python

- set_fact:
python_exists: "{{ which_python.stdout.find('no python') == -1 }}"

- name: Install python3
raw: rpm-ostree install python3
args:
executable: /usr/bin/bash
when: not python_exists

# A reboot is required because rpm-ostree does not install python until
# the system reboots
- name: Reboot
raw: systemctl reboot
raw: |
rpm-ostree install -y --apply-live --idempotent python3
args:
executable: /usr/bin/bash
when: not python_exists
ignore_unreachable: true

- name: Wait for reboot to complete
wait_for_connection:
delay: 10
sleep: 10
timeout: 120
Loading