tags and whitespaces
This commit is contained in:
parent
5bca101457
commit
aec0ecea99
|
@ -5,7 +5,7 @@
|
||||||
regexp: "backports"
|
regexp: "backports"
|
||||||
state: absent
|
state: absent
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Backports sources list is installed
|
- name: Backports sources list is installed
|
||||||
template:
|
template:
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
register: apt_backports_list
|
register: apt_backports_list
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Backports configuration
|
- name: Backports configuration
|
||||||
copy:
|
copy:
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
register: apt_backports_config
|
register: apt_backports_config
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Archived backport are accepted (jessie)
|
- name: Archived backport are accepted (jessie)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -33,11 +33,13 @@
|
||||||
line: 'Acquire::Check-Valid-Until no;'
|
line: 'Acquire::Check-Valid-Until no;'
|
||||||
create: yes
|
create: yes
|
||||||
state: present
|
state: present
|
||||||
when: ansible_lsb.codename == "jessie"
|
when: ansible_distribution_release == "jessie"
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: Apt update
|
- name: Apt update
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
when: apt_backports_list | changed or apt_backports_config | changed
|
when: apt_backports_list | changed or apt_backports_config | changed
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
|
@ -8,21 +8,23 @@
|
||||||
force: yes
|
force: yes
|
||||||
register: apt_basic_list
|
register: apt_basic_list
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Clean GANDI sources.list.d/debian-security.list
|
- name: Clean GANDI sources.list.d/debian-security.list
|
||||||
file:
|
file:
|
||||||
path: '{{ item }}'
|
path: '{{ item }}'
|
||||||
state: absent
|
state: absent
|
||||||
with_items:
|
with_items:
|
||||||
- /etc/apt/sources.list.d/debian-security.list
|
- /etc/apt/sources.list.d/debian-security.list
|
||||||
- /etc/apt/sources.list.d/debian-stretch.list
|
- /etc/apt/sources.list.d/debian-stretch.list
|
||||||
- /etc/apt/sources.list.d/debian-update.list
|
- /etc/apt/sources.list.d/debian-update.list
|
||||||
when: apt_clean_gandi_sourceslist
|
when: apt_clean_gandi_sourceslist
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: Apt update
|
- name: Apt update
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
when: apt_basic_list | changed
|
when: apt_basic_list | changed
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
|
@ -9,9 +9,11 @@
|
||||||
state: present
|
state: present
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
with_items:
|
with_items:
|
||||||
- { line: "APT::Install-Recommends \"false\";", regexp: 'APT::Install-Recommends' }
|
- { line: "APT::Install-Recommends \"false\";", regexp: 'APT::Install-Recommends' }
|
||||||
- { line: "APT::Install-Suggests \"false\";", regexp: 'APT::Install-Suggests' }
|
- { line: "APT::Install-Suggests \"false\";", regexp: 'APT::Install-Suggests' }
|
||||||
when: apt_evolinux_config
|
when: apt_evolinux_config
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: DPkg invoke hooks
|
- name: DPkg invoke hooks
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -21,24 +23,32 @@
|
||||||
state: present
|
state: present
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
with_items:
|
with_items:
|
||||||
- "DPkg::Pre-Invoke { \"df /tmp | grep -q /tmp && mount -oremount,exec /tmp || true\"; };"
|
- "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::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 /tmp | grep -q /tmp && mount -oremount /tmp || true\"; };"
|
||||||
- "DPkg::Post-Invoke { \"df /usr | grep -q /usr && mount -oremount /usr || true\"; };"
|
- "DPkg::Post-Invoke { \"df /usr | grep -q /usr && mount -oremount /usr || true\"; };"
|
||||||
when: apt_hooks
|
when: apt_hooks
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: Remove Aptitude
|
- name: Remove Aptitude
|
||||||
apt:
|
apt:
|
||||||
name: aptitude
|
name: aptitude
|
||||||
state: absent
|
state: absent
|
||||||
when: apt_remove_aptitude
|
when: apt_remove_aptitude
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: Updating APT cache
|
- name: Updating APT cache
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
changed_when: False
|
changed_when: False
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: Upgrading system
|
- name: Upgrading system
|
||||||
apt:
|
apt:
|
||||||
upgrade: dist
|
upgrade: dist
|
||||||
when: apt_upgrade
|
when: apt_upgrade
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
apt_key:
|
apt_key:
|
||||||
#url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x44975278B8612B5D
|
#url: http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x44975278B8612B5D
|
||||||
data: "{{ lookup('file', 'reg.gpg') }}"
|
data: "{{ lookup('file', 'reg.gpg') }}"
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: Evolix public list is installed (only for Debian)
|
- name: Evolix public list is installed (only for Debian)
|
||||||
template:
|
template:
|
||||||
|
@ -21,7 +23,7 @@
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
register: apt_evolix_public
|
register: apt_evolix_public
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
when: ansible_distribution == "Debian"
|
when: ansible_distribution == "Debian"
|
||||||
|
|
||||||
- name: Apt update
|
- name: Apt update
|
||||||
|
@ -29,4 +31,4 @@
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
when: apt_evolix_public | changed
|
when: apt_evolix_public | changed
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
register: apt_mark
|
register: apt_mark
|
||||||
changed_when: "'{{ item }} set on hold.' in apt_mark.stdout"
|
changed_when: "'{{ item }} set on hold.' in apt_mark.stdout"
|
||||||
with_items: "{{ apt_hold_packages }}"
|
with_items: "{{ apt_hold_packages }}"
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: "hold packages (config)"
|
- name: "hold packages (config)"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -13,12 +15,16 @@
|
||||||
create: True
|
create: True
|
||||||
state: present
|
state: present
|
||||||
with_items: "{{ apt_hold_packages }}"
|
with_items: "{{ apt_hold_packages }}"
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: "unhold packages (apt)"
|
- name: "unhold packages (apt)"
|
||||||
shell: "(apt-mark showhold | grep --quiet {{ item }}) && apt-mark unhold {{ item }}"
|
shell: "(apt-mark showhold | grep --quiet {{ item }}) && apt-mark unhold {{ item }}"
|
||||||
register: apt_mark
|
register: apt_mark
|
||||||
changed_when: "'Canceled hold on {{ item }}.' in apt_mark.stdout"
|
changed_when: "'Canceled hold on {{ item }}.' in apt_mark.stdout"
|
||||||
with_items: "{{ apt_unhold_packages }}"
|
with_items: "{{ apt_unhold_packages }}"
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: "unhold packages (config)"
|
- name: "unhold packages (config)"
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -27,6 +33,8 @@
|
||||||
create: True
|
create: True
|
||||||
state: absent
|
state: absent
|
||||||
with_items: "{{ apt_unhold_packages }}"
|
with_items: "{{ apt_unhold_packages }}"
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: /usr/share/scripts exists
|
- name: /usr/share/scripts exists
|
||||||
file:
|
file:
|
||||||
|
@ -35,6 +43,8 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
state: directory
|
state: directory
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: Check scripts is installed
|
- name: Check scripts is installed
|
||||||
copy:
|
copy:
|
||||||
|
@ -42,6 +52,8 @@
|
||||||
dest: /usr/share/scripts/check_held_packages.sh
|
dest: /usr/share/scripts/check_held_packages.sh
|
||||||
force: yes
|
force: yes
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
||||||
- name: Check for held packages (script)
|
- name: Check for held packages (script)
|
||||||
cron:
|
cron:
|
||||||
|
@ -55,3 +67,5 @@
|
||||||
day: "{{ apt_check_hold_cron_day }}"
|
day: "{{ apt_check_hold_cron_day }}"
|
||||||
month: "{{ apt_check_hold_cron_month }}"
|
month: "{{ apt_check_hold_cron_month }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
tags:
|
||||||
|
- apt
|
||||||
|
|
|
@ -6,34 +6,34 @@
|
||||||
when:
|
when:
|
||||||
- (ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('8', '<')) and (ansible_distribution != "Ubuntu" or ansible_distribution_major_version | version_compare('18', '<'))
|
- (ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('8', '<')) and (ansible_distribution != "Ubuntu" or ansible_distribution_major_version | version_compare('18', '<'))
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Custom configuration
|
- name: Custom configuration
|
||||||
include: config.yml
|
include: config.yml
|
||||||
when: apt_config
|
when: apt_config
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Install basics repositories
|
- name: Install basics repositories
|
||||||
include: basics.yml
|
include: basics.yml
|
||||||
when: apt_install_basics
|
when: apt_install_basics
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Install APT Backports repository
|
- name: Install APT Backports repository
|
||||||
include: backports.yml
|
include: backports.yml
|
||||||
when: apt_install_backports
|
when: apt_install_backports
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Install Evolix Public APT repository
|
- name: Install Evolix Public APT repository
|
||||||
include: evolix_public.yml
|
include: evolix_public.yml
|
||||||
when: apt_install_evolix_public
|
when: apt_install_evolix_public
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
||||||
- name: Install check for packages marked hold
|
- name: Install check for packages marked hold
|
||||||
include: hold_packages.yml
|
include: hold_packages.yml
|
||||||
when: apt_install_hold_packages
|
when: apt_install_hold_packages
|
||||||
tags:
|
tags:
|
||||||
- apt
|
- apt
|
||||||
|
|
Loading…
Reference in a new issue