Check for apt for apt-related tasks.
This commit is contained in:
parent
7a7cdaa296
commit
02ac069075
@ -6,15 +6,18 @@
|
|||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
# APT Cacher-NG Configuration
|
# APT Cacher-NG Configuration
|
||||||
- name: Add APT-Cacher-NG Configuration
|
- name: Add APT-Cacher-NG Configuration
|
||||||
copy:
|
copy:
|
||||||
content: "{{ aptcacher_config }}"
|
content: "{{ aptcacher_config }}"
|
||||||
dest: /etc/apt/apt.conf.d/proxy
|
dest: /etc/apt/apt.conf.d/proxy
|
||||||
|
when: "'apt' in ansible_facts.packages"
|
||||||
|
|
||||||
# Update apt package lists after adding our proxy
|
# Update apt package lists after adding our proxy
|
||||||
- name: Update apt repo package lists from cacher
|
- name: Update apt repo package lists from cacher
|
||||||
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
|
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
|
||||||
|
when: "'apt' in ansible_facts.packages"
|
||||||
|
|
||||||
# User account (ansible) configuration
|
# User account (ansible) configuration
|
||||||
- name: Add deployment user.
|
- name: Add deployment user.
|
||||||
@ -118,6 +121,8 @@
|
|||||||
file:
|
file:
|
||||||
path: /root/.ssh/authorized_keys
|
path: /root/.ssh/authorized_keys
|
||||||
state: absent
|
state: absent
|
||||||
# Upgrade all apt packages for good measur
|
|
||||||
|
# Upgrade all apt packages for good measure.
|
||||||
- name: Upgrade all apt packages
|
- name: Upgrade all apt packages
|
||||||
apt: upgrade=dist force_apt_get=yes
|
apt: upgrade=dist force_apt_get=yes
|
||||||
|
when: "'apt' in ansible_facts.packages"
|
Loading…
x
Reference in New Issue
Block a user