tags and whitespaces

This commit is contained in:
Jérémy Lecour 2019-06-21 10:18:54 +02:00 committed by Jérémy Lecour
parent ce12e32375
commit c2500827e1
6 changed files with 54 additions and 24 deletions

View file

@ -34,6 +34,8 @@
create: yes
state: present
when: ansible_distribution_release == "jessie"
tags:
- apt
- name: Apt update
apt:

View file

@ -19,6 +19,8 @@
- /etc/apt/sources.list.d/debian-stretch.list
- /etc/apt/sources.list.d/debian-update.list
when: apt_clean_gandi_sourceslist
tags:
- apt
- name: Apt update
apt:

View file

@ -12,6 +12,8 @@
- { line: "APT::Install-Recommends \"false\";", regexp: 'APT::Install-Recommends' }
- { line: "APT::Install-Suggests \"false\";", regexp: 'APT::Install-Suggests' }
when: apt_evolinux_config
tags:
- apt
- name: DPkg invoke hooks
lineinfile:
@ -26,19 +28,27 @@
- "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
tags:
- apt
- name: Remove Aptitude
apt:
name: aptitude
state: absent
when: apt_remove_aptitude
tags:
- apt
- name: Updating APT cache
apt:
update_cache: yes
changed_when: False
tags:
- apt
- name: Upgrading system
apt:
upgrade: dist
when: apt_upgrade
tags:
- apt

View file

@ -12,6 +12,8 @@
apt_key:
#url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x44975278B8612B5D
data: "{{ lookup('file', 'reg.gpg') }}"
tags:
- apt
- name: Evolix public list is installed
template:

View file

@ -5,6 +5,8 @@
register: apt_mark
changed_when: "'{{ item }} set on hold.' in apt_mark.stdout"
with_items: "{{ apt_hold_packages }}"
tags:
- apt
- name: "hold packages (config)"
lineinfile:
@ -13,12 +15,16 @@
create: True
state: present
with_items: "{{ apt_hold_packages }}"
tags:
- apt
- name: "unhold packages (apt)"
shell: "(apt-mark showhold | grep --quiet {{ item }}) && apt-mark unhold {{ item }}"
register: apt_mark
changed_when: "'Canceled hold on {{ item }}.' in apt_mark.stdout"
with_items: "{{ apt_unhold_packages }}"
tags:
- apt
- name: "unhold packages (config)"
lineinfile:
@ -27,6 +33,8 @@
create: True
state: absent
with_items: "{{ apt_unhold_packages }}"
tags:
- apt
- name: /usr/share/scripts exists
file:
@ -35,6 +43,8 @@
owner: root
group: root
state: directory
tags:
- apt
- name: Check scripts is installed
copy:
@ -42,6 +52,8 @@
dest: /usr/share/scripts/check_held_packages.sh
force: yes
mode: "0755"
tags:
- apt
- name: Check for held packages (script)
cron:
@ -55,3 +67,5 @@
day: "{{ apt_check_hold_cron_day }}"
month: "{{ apt_check_hold_cron_month }}"
state: "present"
tags:
- apt