From f8a3dfb40e72818286f0fb18efe099d01f129fe7 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 4 Aug 2023 19:32:53 +0200 Subject: apt: add a parameter to install packages --- roles/apt/defaults/main.yml | 1 + roles/apt/tasks/main.yml | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 roles/apt/defaults/main.yml (limited to 'roles/apt') diff --git a/roles/apt/defaults/main.yml b/roles/apt/defaults/main.yml new file mode 100644 index 0000000..ff5adcb --- /dev/null +++ b/roles/apt/defaults/main.yml @@ -0,0 +1 @@ +apt_extra_packages: [] diff --git a/roles/apt/tasks/main.yml b/roles/apt/tasks/main.yml index f26a1f7..63f3ed7 100644 --- a/roles/apt/tasks/main.yml +++ b/roles/apt/tasks/main.yml @@ -18,3 +18,10 @@ - name: Reboot if necessary ansible.builtin.meta: flush_handlers + +- name: Install extra packages + become: true + ansible.builtin.apt: + install_recommends: false + name: '{{ apt_extra_packages }}' + state: present -- cgit v1.2.3