forked from evolix/ansible-roles
replace « x | changed » by « x is changed » add explicit « bool » filter use « length » filter instead of string comparison
55 lines
1.4 KiB
YAML
55 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"
|
|
loop:
|
|
- { 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 | bool
|
|
tags:
|
|
- apt
|
|
|
|
- name: DPkg invoke hooks
|
|
lineinfile:
|
|
dest: /etc/apt/apt.conf.d/z-evolinux.conf
|
|
line: "{{ item }}"
|
|
create: yes
|
|
state: present
|
|
mode: "0640"
|
|
loop:
|
|
- "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 | bool
|
|
tags:
|
|
- apt
|
|
|
|
- name: Remove Aptitude
|
|
apt:
|
|
name: aptitude
|
|
state: absent
|
|
when: apt_remove_aptitude | bool
|
|
tags:
|
|
- apt
|
|
|
|
- name: Updating APT cache
|
|
apt:
|
|
update_cache: yes
|
|
changed_when: False
|
|
tags:
|
|
- apt
|
|
|
|
- name: Upgrading system
|
|
apt:
|
|
upgrade: dist
|
|
when: apt_upgrade | bool
|
|
tags:
|
|
- apt
|