From 23a37ddf65459f351400c3d9f6154481b4ebb072 Mon Sep 17 00:00:00 2001 From: Mischa ter Smitten Date: Fri, 20 Dec 2024 14:40:29 +0100 Subject: [PATCH] Consistency changes --- .github/workflows/ci.yml | 13 +++++-------- Vagrantfile | 23 +++++++++++++++-------- meta/main.yml | 3 ++- molecule/default/collections.yml | 6 +----- molecule/default/molecule.yml | 2 +- tasks/service-initd.yml | 2 +- tasks/service-systemd.yml | 2 +- tasks/service-upstart.yml | 2 +- tests/tasks/pre.yml | 2 +- tests/test.yml | 3 ++- tests/vagrant.yml | 3 ++- 11 files changed, 32 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f7278a..054297c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,14 +44,11 @@ jobs: fail-fast: false matrix: include: - - distro: debian8 - - distro: debian9 - - distro: debian10 - - distro: ubuntu1604 - ansible-version: '>=2.10, <2.11' - - distro: ubuntu1604 - distro: ubuntu1804 + ansible-version: '>=9, <10' - distro: ubuntu2004 + - distro: ubuntu2204 + - distro: ubuntu2404 steps: - name: Check out the codebase @@ -65,8 +62,8 @@ jobs: python-version: '3.x' - name: Install test dependencies - run: pip install 'ansible${{ matrix.ansible-version }}' molecule[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 8868feb..4e0b72f 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,7 +16,21 @@ boxes = [ :box => "bento/ubuntu-20.04", :ip => '10.0.0.14', :cpu => "50", - :ram => "384" + :ram => "512" + }, + { + :name => "ubuntu-2204", + :box => "bento/ubuntu-22.04", + :ip => '10.0.0.15', + :cpu => "50", + :ram => "512" + }, + { + :name => "ubuntu-2404", + :box => "bento/ubuntu-24.04", + :ip => '10.0.0.16', + :cpu => "50", + :ram => "512" }, ] diff --git a/meta/main.yml b/meta/main.yml index 13760e0..492a9bd 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -10,9 +10,10 @@ galaxy_info: platforms: - name: Ubuntu versions: - - xenial - bionic - focal + - jammy + - noble galaxy_tags: - system - networking 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/tasks/service-initd.yml b/tasks/service-initd.yml index 9a4ab9c..cbb3b5b 100644 --- a/tasks/service-initd.yml +++ b/tasks/service-initd.yml @@ -6,7 +6,7 @@ dest: "{{ autossh_tunnel_client_etc_init_d_file }}" owner: root group: root - mode: 0755 + mode: '0755' notify: restart autossh-tunnel-client tags: - autossh-tunnel-client-service-initd-update diff --git a/tasks/service-systemd.yml b/tasks/service-systemd.yml index aaa3325..fca93ad 100644 --- a/tasks/service-systemd.yml +++ b/tasks/service-systemd.yml @@ -6,7 +6,7 @@ dest: "{{ autossh_tunnel_client_etc_systemd_file }}" owner: root group: root - mode: 0644 + mode: '0644' register: _update_systemd_script notify: restart autossh-tunnel-client tags: diff --git a/tasks/service-upstart.yml b/tasks/service-upstart.yml index c770f7c..fb7e84b 100644 --- a/tasks/service-upstart.yml +++ b/tasks/service-upstart.yml @@ -6,7 +6,7 @@ dest: "{{ autossh_tunnel_client_etc_init_file }}" owner: root group: root - mode: 0644 + mode: '0644' notify: restart autossh-tunnel-client tags: - autossh-tunnel-client-service-upstart-update diff --git a/tests/tasks/pre.yml b/tests/tasks/pre.yml index d604cd1..0e63631 100644 --- a/tests/tasks/pre.yml +++ b/tests/tasks/pre.yml @@ -14,7 +14,7 @@ state: directory owner: root group: root - mode: 0700 + mode: '0700' - name: generate key pair ansible.builtin.command: > diff --git a/tests/test.yml b/tests/test.yml index 2790f3a..f1a2bcb 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -1,6 +1,7 @@ # test file --- -- hosts: localhost +- name: converge + hosts: localhost connection: local become: true pre_tasks: diff --git a/tests/vagrant.yml b/tests/vagrant.yml index 09c6f19..9f9261b 100644 --- a/tests/vagrant.yml +++ b/tests/vagrant.yml @@ -1,6 +1,7 @@ # test file --- -- hosts: all +- name: converge + hosts: all remote_user: vagrant become: true pre_tasks: