From cadc8824e093f37c36263b2aefba3cd680389f0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Thu, 29 Dec 2022 15:20:47 +0100 Subject: feat(roles/_workstation): add makepkg role --- roles/_workstation/basetools/defaults/main.yml | 9 ++++++++- roles/_workstation/basetools/meta/main.yml | 21 +++++++++++++++++++++ roles/_workstation/basetools/tasks/install.yml | 22 ++++++++++++++++++++++ roles/_workstation/basetools/tasks/main.yml | 8 ++++++++ 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 roles/_workstation/basetools/meta/main.yml create mode 100644 roles/_workstation/basetools/tasks/install.yml (limited to 'roles/_workstation/basetools') diff --git a/roles/_workstation/basetools/defaults/main.yml b/roles/_workstation/basetools/defaults/main.yml index 740a870..f26785a 100644 --- a/roles/_workstation/basetools/defaults/main.yml +++ b/roles/_workstation/basetools/defaults/main.yml @@ -1,6 +1,13 @@ --- -basetools_distribution_packages: [] +basetools_distribution_packages: +basetools_makepkg_packages: + - conftest + - dive-bin + - pandoc-bin + - pipewatch-git + - wkhtmltopdf + - yay-bin basetools_common_packages: - ansible - ansible-lint diff --git a/roles/_workstation/basetools/meta/main.yml b/roles/_workstation/basetools/meta/main.yml new file mode 100644 index 0000000..f4acc42 --- /dev/null +++ b/roles/_workstation/basetools/meta/main.yml @@ -0,0 +1,21 @@ +--- + +argument_specs: + main: + short_description: basetools main entrypoint. + options: + basetools_common_packages: + type: list + elements: str + required: true + description: Common packages accross all operating system + basetools_distribution_packages: + type: list + elements: str + required: true + description: Operating system specific packages + basetools_makepkg_packages: + type: list + elements: str + required: true + description: Makepkg specific packages diff --git a/roles/_workstation/basetools/tasks/install.yml b/roles/_workstation/basetools/tasks/install.yml new file mode 100644 index 0000000..5e24f4e --- /dev/null +++ b/roles/_workstation/basetools/tasks/install.yml @@ -0,0 +1,22 @@ +--- + +- name: install distribution packages + ansible.builtin.package: + name: "{{ item }}" + state: present + loop: + - "{{ basetools_common_packages }}" + - "{{ basetools_distribution_packages }}" + +- name: install community package + ansible.builtin.include_role: + name: _workstation/makepkg + vars: + makepkg_package_name: "{{ item }}" + loop: + - conftest + - dive-bin + - pandoc-bin + - pipewatch-git + - wkhtmltopdf + when: ansible_distribution in ["Archlinux"] diff --git a/roles/_workstation/basetools/tasks/main.yml b/roles/_workstation/basetools/tasks/main.yml index f53d213..6b8e1cd 100644 --- a/roles/_workstation/basetools/tasks/main.yml +++ b/roles/_workstation/basetools/tasks/main.yml @@ -11,3 +11,11 @@ loop: - "{{ basetools_common_packages }}" - "{{ basetools_distribution_packages }}" + +- name: install community package + ansible.builtin.include_role: + name: _workstation/makepkg + vars: + makepkg_package_name: "{{ item }}" + loop: "{{ basetools_makepkg_packages }}" + when: ansible_distribution in ["Archlinux"] -- cgit v1.2.3