Skip to content

Commit

Permalink
Attempt to run commands inside ansible container.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy committed Nov 9, 2022
1 parent b99f1ce commit 3c13a60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,19 @@ jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
container:
image: geerlingguy/docker-ubuntu2204-ansible:latest
volumes:
- ${GITHUB_WORKSPACE}:/code
environment:
ANSIBLE_FORCE_COLOR: "true"

steps:
- name: Check out the codebase.
uses: actions/checkout@v2

- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install test dependencies.
run: pip3 install ansible

- name: Set up files for the test.
run: cp example.hosts.ini hosts.ini
run: cd /code && cp example.hosts.ini hosts.ini

- name: Run the HPL benchmark playbook without networking.
run: ansible-playbook main.yml --tags "setup,benchmark"
run: cd /code && ansible-playbook main.yml --tags "setup,benchmark"
4 changes: 2 additions & 2 deletions main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@

tasks:
- name: Update apt cache.
apt:
ansible.builtin.apt:
update_cache: true
cache_valid_time: 600
when: ansible_os_family == 'Debian'
become: true

- name: Install dependencies.
ansible.builtin.apt:
ansible.builtin.package:
name:
- gfortran
- automake
Expand Down

0 comments on commit 3c13a60

Please sign in to comment.