Skip to content

Commit

Permalink
fix matrix, do not install python-devel
Browse files Browse the repository at this point in the history
  • Loading branch information
mafalb committed Jan 8, 2024
1 parent e35a96d commit b234ef0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 75 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,26 +272,17 @@ jobs:
- ansible_version: '2.16'
python_version: '3.9'

- os: fedora38
python_version: '3.11'

# c9s has only 3.9 at this point
# c9s has 3.9, 3.11
- os: c9s
python_version: '3.10'
- os: c9s
python_version: '3.11'

# alma9 has 3.9
# alma9 has 3.9, 3.11
- os: alma9
python_version: '3.10'
- os: alma9
python_version: '3.11'

# rocky9 has 3.9
# rocky9 has 3.9, 3.11
- os: rocky9
python_version: '3.10'
- os: rocky9
python_version: '3.11'

# arch has 2.7 and 3.9
#- os: arch
Expand Down Expand Up @@ -351,6 +342,11 @@ jobs:
source ~/.virtualenvs/molecule/bin/activate
ansible --version | grep "^ansible.* ${{ matrix.ansible_version }}"
- name: check python version
run: |
source ~/.virtualenvs/molecule/bin/activate
ansible --version | grep "^\s*python.* ${{ matrix.python_version }}"
- name: molecule scenario virtualenv
run: |
source ~/.virtualenvs/molecule/bin/activate
Expand Down
3 changes: 1 addition & 2 deletions molecule/resources/Dockerfile-dnf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ ENV {{ var }} {{ value }}
{% endfor %}
{% endif %}

RUN dnf makecache && dnf --assumeyes install python3 sudo python3-devel python*-dnf bash iproute && dnf clean all

RUN dnf makecache && dnf --assumeyes install python3 sudo python3-dnf bash iproute which && dnf clean all
26 changes: 0 additions & 26 deletions molecule/resources/Dockerfile-new.j2

This file was deleted.

36 changes: 1 addition & 35 deletions molecule/resources/Dockerfile.j2
Original file line number Diff line number Diff line change
@@ -1,35 +1 @@

{% if item.registry is defined %}
FROM {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
{% endif %}

{% if item.image.endswith('centos:7') or item.image.endswith('ubuntu:18') %}
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
{% else %}
ENV LC_ALL C.UTF-8
ENV LC_ALL C.UTF-8
{% endif %}

{% if item.env is defined %}
{% for var, value in item.env.items() %}
{% if value %}
ENV {{ var }} {{ value }}
{% endif %}
{% endfor %}
{% endif %}

{% if item.image.endswith('debian:9') %}
# use python2
RUN apt-get update && apt-get install -y python sudo bash ca-certificates iproute2 && apt-get clean
{% else %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates iproute2 && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3 sudo python3-devel python*-dnf bash iproute && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash iproute && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml iproute2 && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
elif [ $(command -v pacman) ]; then pacman -Sy && pacman --noconfirm -Sq core/python core/iproute2 core/sudo core/which core/systemd;\
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi
{% endif %}
# {{ ansible_managed }}

0 comments on commit b234ef0

Please sign in to comment.