From 09df6054245c96ad2ab9951fb2f5bd379afda9dc Mon Sep 17 00:00:00 2001 From: Michael Wilson Date: Thu, 24 Nov 2022 15:59:40 +0100 Subject: [PATCH] add debian bootstrap tasks --- common/bootstrap/tasks/debian.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 common/bootstrap/tasks/debian.yml diff --git a/common/bootstrap/tasks/debian.yml b/common/bootstrap/tasks/debian.yml new file mode 100644 index 0000000..c498593 --- /dev/null +++ b/common/bootstrap/tasks/debian.yml @@ -0,0 +1,22 @@ +- name: refresh apt cache and update packages + apt: + name: "*" + state: latest + update_cache: yes + ignore_errors: "{{ bootstrap_ignore_update_errors | default('no') }}" + +- name: manage packages + apt: + name: "{{ package.name }}" + state: "{{ package.state }}" + loop: "{{ bootstrap_packages[ansible_distribution|lower] }}" + loop_control: + loop_var: package + +- name: edit sudoers + lineinfile: + dest: /etc/sudoers + state: present + regexp: '^%sudo' + line: '%sudo ALL=(ALL) NOPASSWD: ALL' + validate: 'visudo -cf %s'