Ansible roles by Evolix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.3 KiB

  1. ---
  2. - name: Evolinux config for APT
  3. lineinfile:
  4. dest: /etc/apt/apt.conf.d/z-evolinux.conf
  5. line: "{{ item.line }}"
  6. regexp: "{{ item.regexp }}"
  7. create: yes
  8. state: present
  9. mode: "0640"
  10. with_items:
  11. - { line: "APT::Install-Recommends \"false\";", regexp: 'APT::Install-Recommends' }
  12. - { line: "APT::Install-Suggests \"false\";", regexp: 'APT::Install-Suggests' }
  13. when: apt_evolinux_config
  14. tags:
  15. - apt
  16. - name: DPkg invoke hooks
  17. lineinfile:
  18. dest: /etc/apt/apt.conf.d/z-evolinux.conf
  19. line: "{{ item }}"
  20. create: yes
  21. state: present
  22. mode: "0640"
  23. with_items:
  24. - "DPkg::Pre-Invoke { \"df /tmp | grep -q /tmp && mount -oremount,exec /tmp || true\"; };"
  25. - "DPkg::Pre-Invoke { \"df /usr | grep -q /usr && mount -oremount,rw /usr || true\"; };"
  26. - "DPkg::Post-Invoke { \"df /tmp | grep -q /tmp && mount -oremount /tmp || true\"; };"
  27. - "DPkg::Post-Invoke { \"df /usr | grep -q /usr && mount -oremount /usr || true\"; };"
  28. when: apt_hooks
  29. tags:
  30. - apt
  31. - name: Remove Aptitude
  32. apt:
  33. name: aptitude
  34. state: absent
  35. when: apt_remove_aptitude
  36. tags:
  37. - apt
  38. - name: Updating APT cache
  39. apt:
  40. update_cache: yes
  41. changed_when: False
  42. tags:
  43. - apt
  44. - name: Upgrading system
  45. apt:
  46. upgrade: dist
  47. when: apt_upgrade
  48. tags:
  49. - apt