forked from evolix/ansible-roles
50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
---
|
|
|
|
- include_role:
|
|
name: apt-repositories
|
|
vars:
|
|
apt_repositories_install_basics: "{{ evolinux_apt_replace_default_sources }}"
|
|
apt_repositories_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 \"0\";"
|
|
- "APT::Install-Suggests \"0\";"
|
|
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 { \"mount -oremount,exec /tmp && mount -oremount,rw /usr || true\"; };"
|
|
- "DPkg::Post-Invoke { \"mount -oremount /tmp && mount -oremount /usr || exit 0\"; };"
|
|
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
|