1
0
forked from finallycoffee/base

feat: add playbooks for bootstrapping (installing python) and installing system packages (debian)

This commit is contained in:
2025-04-21 13:32:13 +02:00
parent 0771787c98
commit c9b2f61787
2 changed files with 55 additions and 0 deletions

15
playbooks/packages.yml Normal file
View File

@ -0,0 +1,15 @@
---
- name: Install system packages on the remote
hosts: "{{ target_hosts | default('all', true) }}"
become: "{{ target_host_become | default(true, true) }}"
gather_facts: "{{ target_host_gather_facts | default(true, true) }}"
tasks:
- name: Install packages (apt)
ansible.builtin.apt:
package: "{{ package.name }}"
state: "{{ package.state | default('present') }}"
loop: "{{ system_packages | default([], true) }}"
loop_control:
loop_var: package
label: "{{ package.name }}"
when: ansible_facts['pkg_mgr'] == 'apt'