forked from evolix/ansible-roles
Ludovic Poujol
1d8b7c3bea
This interfere with our usual workflow (listupgrade) Note : Using 0 instead of false is intentional, The value is used by the apt-daily script that except a "0" to disable itself.
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
---
|
|
|
|
- name: Evolinux config for APT
|
|
lineinfile:
|
|
dest: /etc/apt/apt.conf.d/z-evolinux.conf
|
|
line: "{{ item.line }}"
|
|
regexp: "{{ item.regexp }}"
|
|
create: yes
|
|
state: present
|
|
mode: "0640"
|
|
with_items:
|
|
- { line: "APT::Install-Recommends \"false\";", regexp: 'APT::Install-Recommends' }
|
|
- { line: "APT::Install-Suggests \"false\";", regexp: 'APT::Install-Suggests' }
|
|
- { line: "APT::Periodic::Enable \"0\";", regexp: 'APT::Periodic::Enable' }
|
|
when: apt_evolinux_config
|
|
tags:
|
|
- apt
|
|
|
|
- name: DPkg invoke hooks
|
|
lineinfile:
|
|
dest: /etc/apt/apt.conf.d/z-evolinux.conf
|
|
line: "{{ item }}"
|
|
create: yes
|
|
state: present
|
|
mode: "0640"
|
|
with_items:
|
|
- "DPkg::Pre-Invoke { \"df /tmp | grep -q /tmp && mount -oremount,exec /tmp || true\"; };"
|
|
- "DPkg::Pre-Invoke { \"df /usr | grep -q /usr && mount -oremount,rw /usr || true\"; };"
|
|
- "DPkg::Post-Invoke { \"df /tmp | grep -q /tmp && mount -oremount /tmp || true\"; };"
|
|
- "DPkg::Post-Invoke { \"df /usr | grep -q /usr && mount -oremount /usr || true\"; };"
|
|
when: apt_hooks
|
|
tags:
|
|
- apt
|
|
|
|
- name: Remove Aptitude
|
|
apt:
|
|
name: aptitude
|
|
state: absent
|
|
when: apt_remove_aptitude
|
|
tags:
|
|
- apt
|
|
|
|
- name: Updating APT cache
|
|
apt:
|
|
update_cache: yes
|
|
changed_when: False
|
|
tags:
|
|
- apt
|
|
|
|
- name: Upgrading system
|
|
apt:
|
|
upgrade: dist
|
|
when: apt_upgrade
|
|
tags:
|
|
- apt
|