From ba3896d22e8dda751b6d2333c4370d035f1b2bbb Mon Sep 17 00:00:00 2001 From: Andrew Rothstein Date: Mon, 18 Dec 2023 05:31:17 +0000 Subject: [PATCH] latest CIs --- .github/workflows/build.yml | 48 +++------------------------------ dcb-os.yml | 14 ---------- meta/main.yml | 53 ++++++++++++++++++------------------- meta/requirements.yml | 4 +-- platform-matrix-v1.json | 50 ++++++++++++++++++++++++++++++++++ tasks/main.yml | 32 +++++++++++----------- 6 files changed, 97 insertions(+), 104 deletions(-) delete mode 100644 dcb-os.yml create mode 100644 platform-matrix-v1.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a08562..bb3428d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,47 +1,5 @@ --- jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: install python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: install task - uses: arduino/setup-task@v1 - with: - repo-token: ${{ github.token }} - - name: task ver - run: task --version - - name: download task mono - uses: actions/checkout@v2 - with: - path: taskmono - ref: develop - repository: andrewrothstein/tasks - - name: 'task #ftw' - run: task -t taskmono/ansible-test-role.yml "targetuser=${{ github.actor }}" - "targetpwd=${{ github.token }}" "alltags=${{ matrix.os }}" - strategy: - fail-fast: false - matrix: - os: - - alpine_3.16 - - alpine_3.17 - - alpine_edge - - archlinux_latest - - debian_bullseye - - debian_buster - - fedora_36 - - fedora_37 - - rockylinux_8 - - rockylinux_9 - - ubuntu_bionic - - ubuntu_focal - - ubuntu_jammy - python-version: - - '3.11' -name: dcb -'on': -- push + bake-ansible-images-v1: + uses: andrewrothstein/.github/.github/workflows/bake-ansible-images-v1.yml@develop +'on': push diff --git a/dcb-os.yml b/dcb-os.yml deleted file mode 100644 index b6c507b..0000000 --- a/dcb-os.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -- alpine_3.16 -- alpine_3.17 -- alpine_edge -- archlinux_latest -- debian_bullseye -- debian_buster -- fedora_36 -- fedora_37 -- rockylinux_8 -- rockylinux_9 -- ubuntu_bionic -- ubuntu_focal -- ubuntu_jammy diff --git a/meta/main.yml b/meta/main.yml index 90fda73..1e40bc4 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -4,31 +4,30 @@ galaxy_info: company: PointState Capital description: matchbox from posiedon galaxy_tags: - - development - license: - - MIT - min_ansible_version: 2.0 + - development + license: MIT + min_ansible_version: '2.0' platforms: - - name: Alpine - versions: - - all - - name: Archlinux - versions: - - all - - name: Debian - versions: - - bullseye - - buster - - name: EL - versions: - - 8 - - 9 - - name: Fedora - versions: - - 36 - - 37 - - name: Ubuntu - versions: - - bionic - - focal - - jammy + - name: Alpine + versions: + - all + - name: Archlinux + versions: + - all + - name: Debian + versions: + - bookworm + - bullseye + - name: EL + versions: + - 8 + - 9 + - name: Fedora + versions: + - 38 + - 39 + - name: Ubuntu + versions: + - focal + - jammy + role_name: matchbox diff --git a/meta/requirements.yml b/meta/requirements.yml index d1808a8..055806e 100644 --- a/meta/requirements.yml +++ b/meta/requirements.yml @@ -1,3 +1,3 @@ --- -- name: andrewrothstein.unarchive-deps - version: v1.2.4 +- name: andrewrothstein.unarchivedeps + version: 3.0.0 diff --git a/platform-matrix-v1.json b/platform-matrix-v1.json new file mode 100644 index 0000000..db72e9c --- /dev/null +++ b/platform-matrix-v1.json @@ -0,0 +1,50 @@ +[ + { + "OS": "alpine", + "OS_VER": "3.18" + }, + { + "OS": "alpine", + "OS_VER": "3.19" + }, + { + "OS": "alpine", + "OS_VER": "edge" + }, + { + "OS": "archlinux", + "OS_VER": "latest" + }, + { + "OS": "debian", + "OS_VER": "bookworm" + }, + { + "OS": "debian", + "OS_VER": "bullseye" + }, + { + "OS": "fedora", + "OS_VER": "38" + }, + { + "OS": "fedora", + "OS_VER": "39" + }, + { + "OS": "rockylinux", + "OS_VER": "8" + }, + { + "OS": "rockylinux", + "OS_VER": "9" + }, + { + "OS": "ubuntu", + "OS_VER": "focal" + }, + { + "OS": "ubuntu", + "OS_VER": "jammy" + } +] diff --git a/tasks/main.yml b/tasks/main.yml index 2ac7f84..6795540 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,8 +1,8 @@ --- -- include_role: - name: andrewrothstein.unarchive-deps -- name: resolve platform specific vars - include_vars: '{{ item }}' +- ansible.builtin.include_role: + name: andrewrothstein.unarchivedeps +- name: Resolve platform specific vars + ansible.builtin.include_vars: '{{ item }}' with_first_found: - files: - '{{ ansible_distribution }}-{{ ansible_distribution_release }}.yml' @@ -11,50 +11,50 @@ skip: true paths: - '{{ role_path }}/vars' -- name: check for install in {{ matchbox_install_dir }} +- name: Check for install in {{ matchbox_install_dir }} become: true become_user: root - stat: + ansible.builtin.stat: path: '{{ matchbox_install_dir }}' changed_when: false register: matchbox_binary - when: not matchbox_binary.stat.exists block: - - name: downloading {{ matchbox_tgz_url }} + - name: Downloading {{ matchbox_tgz_url }} become: true become_user: root - get_url: + ansible.builtin.get_url: url: '{{ matchbox_tgz_url }}' dest: '{{ matchbox_tmp_tgz }}' checksum: '{{ matchbox_checksum }}' - mode: 0644 + mode: '644' - name: unarchiving {{ matchbox_tmp_tgz }} to {{ matchbox_install_parent_dir }} become: true become_user: root - unarchive: + ansible.builtin.unarchive: remote_src: true src: '{{ matchbox_tmp_tgz }}' dest: '{{ matchbox_install_parent_dir }}' creates: '{{ matchbox_install_dir }}' always: - - name: rm {{ matchbox_tmp_tgz }} + - name: Rm {{ matchbox_tmp_tgz }} become: true become_user: root - file: + ansible.builtin.file: path: '{{ matchbox_tmp_tgz }}' state: absent -- name: linking {{ matchbox_link_dir }} to {{ matchbox_install_dir }} +- name: Linking {{ matchbox_link_dir }} to {{ matchbox_install_dir }} become: true become_user: root - file: + ansible.builtin.file: src: '{{ matchbox_install_dir }}' dest: '{{ matchbox_link_dir }}' state: link -- name: linking {{ matchbox_link }} to {{ matchbox_install_exe }} +- name: Linking {{ matchbox_link }} to {{ matchbox_install_exe }} become: true become_user: root - file: + ansible.builtin.file: src: '{{ matchbox_install_exe }}' dest: '{{ matchbox_link }}' state: link