Compare commits
No commits in common. "905affc83b9ba6d84f575b6c1b09c2b72fc0800c" and "4fe85270a665665cdb7f0be8af1a1d10bf633afb" have entirely different histories.
905affc83b
...
4fe85270a6
4 changed files with 22 additions and 5 deletions
9
roles/common/tasks/apt-minimal.yaml
Normal file
9
roles/common/tasks/apt-minimal.yaml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
- name: Configure auto-upgrades
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: apt-minimal
|
||||||
|
dest: /etc/apt/apt.conf.d/20minimal
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
|
@ -1,7 +1,14 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: Install or remove prometheus node-exporter
|
- name: Install node-exporter
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: prometheus-node-exporter
|
name: prometheus-node-exporter
|
||||||
state: "{% if node_exporter %}present{% else %}absent{% endif %}"
|
state: present
|
||||||
|
when: node_exporter
|
||||||
|
|
||||||
|
- name: Remove node-exporter
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: prometheus-node-exporter
|
||||||
|
state: absent
|
||||||
autoremove: yes
|
autoremove: yes
|
||||||
|
when: not node_exporter
|
||||||
|
|
4
roles/common/templates/apt-minimal
Normal file
4
roles/common/templates/apt-minimal
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Managed by Ansible
|
||||||
|
|
||||||
|
APT::Install-Recommends "0";
|
||||||
|
APT::Install-Suggests "0";
|
|
@ -6,6 +6,3 @@ Acquire::http::Proxy "http://{{ proxy_host }}:{{ proxy_port }}/";
|
||||||
|
|
||||||
# Don't download translation-files
|
# Don't download translation-files
|
||||||
Acquire::Languages "none";
|
Acquire::Languages "none";
|
||||||
|
|
||||||
APT::Install-Recommends "0";
|
|
||||||
APT::Install-Suggests "0";
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue