From 7701eddce1cc310a4fb7cd93363a5f24fc97b01e Mon Sep 17 00:00:00 2001 From: Andrew Rothstein Date: Mon, 22 Jan 2024 05:12:20 +0000 Subject: [PATCH] delint --- .config/ansible-lint.yml | 3 +++ .yamllint.yaml | 3 +++ meta/main.yml | 11 ++++++----- meta/requirements.yml | 2 +- platform-matrix-v1.json | 2 +- tasks/main.yml | 8 +++++--- test.yml | 16 ++++++++++------ 7 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 .config/ansible-lint.yml create mode 100644 .yamllint.yaml diff --git a/.config/ansible-lint.yml b/.config/ansible-lint.yml new file mode 100644 index 0000000..e807dd1 --- /dev/null +++ b/.config/ansible-lint.yml @@ -0,0 +1,3 @@ +--- +skip_list: + - 'name[template]' diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..0c01e2b --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,3 @@ +--- +rules: + line-length: disable diff --git a/meta/main.yml b/meta/main.yml index 1e40bc4..928a5fb 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -7,11 +7,12 @@ galaxy_info: - development license: MIT min_ansible_version: '2.0' + namespace: andrewrothstein platforms: - name: Alpine versions: - all - - name: Archlinux + - name: ArchLinux versions: - all - name: Debian @@ -20,12 +21,12 @@ galaxy_info: - bullseye - name: EL versions: - - 8 - - 9 + - '8' + - '9' - name: Fedora versions: - - 38 - - 39 + - '38' + - '39' - name: Ubuntu versions: - focal diff --git a/meta/requirements.yml b/meta/requirements.yml index 055806e..166b148 100644 --- a/meta/requirements.yml +++ b/meta/requirements.yml @@ -1,3 +1,3 @@ --- - name: andrewrothstein.unarchivedeps - version: 3.0.0 + version: 3.0.1 diff --git a/platform-matrix-v1.json b/platform-matrix-v1.json index db72e9c..b4505bc 100644 --- a/platform-matrix-v1.json +++ b/platform-matrix-v1.json @@ -47,4 +47,4 @@ "OS": "ubuntu", "OS_VER": "jammy" } -] +] \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 6795540..f397073 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,5 +1,6 @@ --- -- ansible.builtin.include_role: +- name: Installing andrewrothstein.unarchivedeps + ansible.builtin.include_role: name: andrewrothstein.unarchivedeps - name: Resolve platform specific vars ansible.builtin.include_vars: '{{ item }}' @@ -18,7 +19,8 @@ path: '{{ matchbox_install_dir }}' changed_when: false register: matchbox_binary -- when: not matchbox_binary.stat.exists +- name: Downloading and installing matchbox + when: not matchbox_binary.stat.exists block: - name: Downloading {{ matchbox_tgz_url }} become: true @@ -28,7 +30,7 @@ dest: '{{ matchbox_tmp_tgz }}' checksum: '{{ matchbox_checksum }}' mode: '644' - - name: unarchiving {{ matchbox_tmp_tgz }} to {{ matchbox_install_parent_dir }} + - name: Unarchiving {{ matchbox_tmp_tgz }} to {{ matchbox_install_parent_dir }} become: true become_user: root ansible.builtin.unarchive: diff --git a/test.yml b/test.yml index e0e43e9..ef8fccc 100644 --- a/test.yml +++ b/test.yml @@ -1,10 +1,14 @@ --- -- hosts: all - roles: - - role: '{{ playbook_dir }}' +- name: Testing andrewrothstein.matchbox + hosts: all tasks: - - command: /usr/local/bin/matchbox --version + - name: Installing andrewrothstein.matchbox + ansible.builtin.include_role: + name: '{{ playbook_dir }}' + - name: Executing 'matchbox --version' + ansible.builtin.command: /usr/local/bin/matchbox --version + changed_when: false register: matchbox_test_output - - name: matchbox --version - debug: + - name: Output from 'matchbox --version' + ansible.builtin.debug: msg: '{{ matchbox_test_output.stdout }}'