forked from evolix/ansible-roles
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
---
|
|
|
|
- include_role:
|
|
name: apt
|
|
vars:
|
|
apt_install_basics: "{{ evolinux_apt_replace_default_sources }}"
|
|
apt_install_evolix_public: "{{ evolinux_apt_public_sources }}"
|
|
|
|
- name: Setting apt config
|
|
lineinfile:
|
|
dest: /etc/apt/apt.conf.d/z-evolinux.conf
|
|
line: "{{ item }}"
|
|
create: yes
|
|
state: present
|
|
mode: "0640"
|
|
with_items:
|
|
- "APT::Install-Recommends \"false\";"
|
|
- "APT::Install-Suggests \"false\";"
|
|
when: evolinux_apt_conf
|
|
|
|
- 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: evolinux_apt_hooks
|
|
|
|
- name: Remove Aptitude
|
|
apt:
|
|
name: aptitude
|
|
state: absent
|
|
when: evolinux_apt_remove_aptitude
|
|
|
|
- name: Updating APT cache
|
|
apt:
|
|
update_cache: yes
|
|
changed_when: False
|
|
|
|
- name: Upgrading system
|
|
apt:
|
|
upgrade: dist
|
|
when: evolinux_apt_upgrade
|
|
|
|
- meta: flush_handlers
|