Skip to content

Commit

Permalink
fix: errors during tests
Browse files Browse the repository at this point in the history
* chore: run container for tests as privileged

* chore: set Ubuntu's version for CI Runner

* chore: switch back to latest Ubuntu, and update molecule config

* chore: remove cgroupns_mode from molecule config

* chore: set proper config for molecule

* fix: add R installation for with-python test scenario
  • Loading branch information
koralowiec authored Feb 22, 2023
1 parent f92d9a7 commit cf40df4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
6 changes: 3 additions & 3 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ platforms:
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
capabilities:
- SYS_ADMIN
- /sys/fs/cgroup:/sys/fs/cgroup:rw
privileged: true
cgroupns_mode: host
pre_build_image: true
platform: linux/amd64
provisioner:
Expand Down
3 changes: 2 additions & 1 deletion molecule/with-python/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ platforms:
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
published_ports:
- "0.0.0.0:3940:3939/tcp"
privileged: true
cgroupns_mode: host
pre_build_image: true
provisioner:
name: ansible
Expand Down
13 changes: 11 additions & 2 deletions molecule/with-python/prepare.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
---
- name: Prepare
hosts: all
become: true
tasks: []
tasks:
- name: Install R from package
ansible.builtin.apt:
name: r-base
update_cache: true
when: ansible_os_family == 'Debian'

- name: Install R from package
ansible.builtin.yum:
name: R
when: ansible_os_family == 'RedHat'

0 comments on commit cf40df4

Please sign in to comment.