diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e2bc34..70e6297 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,14 +44,14 @@ jobs: fail-fast: false matrix: include: - - distro: debian8 - - distro: debian9 - distro: debian10 - - distro: ubuntu1604 - ansible-version: '>=2.10, <2.11' - - distro: ubuntu1604 + - distro: debian11 + - distro: debian12 - distro: ubuntu1804 + ansible-version: '>=9, <10' - distro: ubuntu2004 + - distro: ubuntu2204 + - distro: ubuntu2404 steps: - name: Check out the codebase @@ -65,8 +65,8 @@ jobs: python-version: '3.x' - name: Install test dependencies - run: pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker - + run: | + pip install 'ansible${{ matrix.ansible-version }}' molecule-plugins[docker] docker - name: Run Molecule tests run: | molecule test diff --git a/Vagrantfile b/Vagrantfile index a0182a0..e86d32d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -4,13 +4,6 @@ role = File.basename(File.expand_path(File.dirname(__FILE__))) boxes = [ - { - :name => "ubuntu-1604", - :box => "bento/ubuntu-16.04", - :ip => '10.0.0.12', - :cpu => "50", - :ram => "256" - }, { :name => "ubuntu-1804", :box => "bento/ubuntu-18.04", @@ -23,21 +16,21 @@ boxes = [ :box => "bento/ubuntu-20.04", :ip => '10.0.0.14', :cpu => "50", - :ram => "384" + :ram => "512" }, { - :name => "debian-8", - :box => "bento/debian-8", - :ip => '10.0.0.16', + :name => "ubuntu-2204", + :box => "bento/ubuntu-22.04", + :ip => '10.0.0.15', :cpu => "50", - :ram => "256" + :ram => "512" }, { - :name => "debian-9", - :box => "bento/debian-9", - :ip => '10.0.0.17', + :name => "ubuntu-2404", + :box => "bento/ubuntu-24.04", + :ip => '10.0.0.16', :cpu => "50", - :ram => "256" + :ram => "512" }, { :name => "debian-10", @@ -46,6 +39,20 @@ boxes = [ :cpu => "50", :ram => "256" }, + { + :name => "debian-11", + :box => "bento/debian-11", + :ip => '10.0.0.19', + :cpu => "50", + :ram => "256" + }, + { + :name => "debian-12", + :box => "bento/debian-12", + :ip => '10.0.0.20', + :cpu => "50", + :ram => "384" + }, ] Vagrant.configure("2") do |config| diff --git a/meta/main.yml b/meta/main.yml index 86f8bac..c5e7be0 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -1,9 +1,8 @@ # meta file --- galaxy_info: - namespace: oefenweb + author: oefenweb role_name: virtualenv - author: Mischa ter Smitten company: Oefenweb.nl B.V. description: Set up (the latest version of) virtualenv(wrapper) in Debian-like systems license: MIT @@ -11,14 +10,15 @@ galaxy_info: platforms: - name: Ubuntu versions: - - xenial - bionic - focal + - jammy + - noble - name: Debian versions: - - jessie - - stretch - buster + - bullseye + - bookworm galaxy_tags: - development - system diff --git a/molecule/default/collections.yml b/molecule/default/collections.yml index c3d7e2a..1062b36 100644 --- a/molecule/default/collections.yml +++ b/molecule/default/collections.yml @@ -1,6 +1,2 @@ --- -collections: - - name: community.docker - version: '>=1.2.0,<2' - - name: community.general - version: '>=2,<3' +collections: [] diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 8841165..908aaf6 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -5,7 +5,7 @@ driver: name: docker platforms: - name: instance - image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu1604}-ansible:latest" + image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest" command: ${MOLECULE_DOCKER_COMMAND:-""} volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw diff --git a/tests/tasks/pre.yml b/tests/tasks/pre.yml index 75d671d..130f8f1 100644 --- a/tests/tasks/pre.yml +++ b/tests/tasks/pre.yml @@ -1,17 +1,28 @@ # pre test file --- -- name: install dependencies - ansible.builtin.apt: - name: - - "python{{ virtualenv_python_version_major is version('3', '>=') | ternary('3', '') }}" - - curl - state: "{{ apt_install_state | default('latest') }}" - update_cache: true - cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" - -- name: install pip # noqa command-instead-of-module +- name: pip | check ansible.builtin.shell: > - curl -sL {{ virtualenv_get_pip_url }} | python{{ virtualenv_python_version_major | string }} - + which pip + register: _pip_installed changed_when: false - tags: - - skip_ansible_lint + check_mode: false + failed_when: false + +- name: pip | install + when: _pip_installed.rc != 0 + block: + - name: dependencies | install + ansible.builtin.apt: + name: + - "python{{ virtualenv_python_version_major is version('3', '>=') | ternary('3', '') }}" + - curl + state: "{{ apt_install_state | default('latest') }}" + update_cache: true + cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}" + + - name: pip | install # noqa command-instead-of-module + ansible.builtin.shell: > + curl -sL {{ virtualenv_get_pip_url }} | python{{ virtualenv_python_version_major | string }} - + changed_when: false + tags: + - skip_ansible_lint diff --git a/tests/vars/_bionic.yml b/tests/vars/_bionic.yml new file mode 100644 index 0000000..8f3360c --- /dev/null +++ b/tests/vars/_bionic.yml @@ -0,0 +1,4 @@ +# vars file +--- +virtualenv_python_version_major: 3 +virtualenv_get_pip_url: 'https://bootstrap.pypa.io/pip/3.6/get-pip.py' diff --git a/tests/vars/_buster.yml b/tests/vars/_buster.yml new file mode 100644 index 0000000..5be4387 --- /dev/null +++ b/tests/vars/_buster.yml @@ -0,0 +1,4 @@ +# vars file +--- +virtualenv_python_version_major: 3 +virtualenv_get_pip_url: 'https://bootstrap.pypa.io/pip/3.7/get-pip.py' diff --git a/tests/vars/_jessie.yml b/tests/vars/_jessie.yml deleted file mode 100644 index ee740fd..0000000 --- a/tests/vars/_jessie.yml +++ /dev/null @@ -1,4 +0,0 @@ -# vars file ---- -virtualenv_python_version_major: 2 -virtualenv_get_pip_url: 'https://bootstrap.pypa.io/pip/2.7/get-pip.py' diff --git a/tests/vars/_stretch.yml b/tests/vars/_stretch.yml deleted file mode 100644 index ee740fd..0000000 --- a/tests/vars/_stretch.yml +++ /dev/null @@ -1,4 +0,0 @@ -# vars file ---- -virtualenv_python_version_major: 2 -virtualenv_get_pip_url: 'https://bootstrap.pypa.io/pip/2.7/get-pip.py' diff --git a/tests/vars/_xenial.yml b/tests/vars/_xenial.yml deleted file mode 100644 index 3d9b802..0000000 --- a/tests/vars/_xenial.yml +++ /dev/null @@ -1,4 +0,0 @@ -# vars file ---- -virtualenv_python_version_major: 3 -virtualenv_get_pip_url: 'https://bootstrap.pypa.io/pip/3.5/get-pip.py'