forked from evolix/ansible-roles
evolinux-base: use apt role for all APT configuration
This commit is contained in:
parent
fae9cd9208
commit
e09a6ace31
|
@ -1,51 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
- 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
|
|
|
@ -6,7 +6,11 @@
|
||||||
- ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('8', '<')
|
- ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('8', '<')
|
||||||
|
|
||||||
- name: Apt configuration
|
- name: Apt configuration
|
||||||
include: apt.yml
|
include_role:
|
||||||
|
name: apt
|
||||||
|
vars:
|
||||||
|
apt_install_basics: "{{ evolinux_apt_replace_default_sources }}"
|
||||||
|
apt_install_evolix_public: "{{ evolinux_apt_public_sources }}"
|
||||||
when: evolinux_apt_include
|
when: evolinux_apt_include
|
||||||
|
|
||||||
- name: /etc versioning with Git
|
- name: /etc versioning with Git
|
||||||
|
|
Loading…
Reference in a new issue