forked from ISTI-ansible-roles/ansible-roles
Add a task that runs a dist-upgrade on request (need to pass 'dist_upgrade=True' to the playbook.
This commit is contained in:
parent
d8b613a7f2
commit
5d1ece1c20
|
@ -3,6 +3,7 @@
|
|||
# Use the apt proxy
|
||||
#
|
||||
use_apt_proxy: False
|
||||
dist_upgrade: False
|
||||
|
||||
pkg_state: installed
|
||||
common_packages:
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- name: Dist upgrade, if requested
|
||||
apt: upgrade=dist update_cache=yes cache_valid_time=1800
|
||||
when: dist_upgrade
|
||||
tags: [ 'packages', 'upgrade', 'dist_upgrade' ]
|
||||
|
|
@ -2,6 +2,8 @@
|
|||
- import_tasks: apt-proxy.yml
|
||||
- import_tasks: resolvconf.yml
|
||||
when: install_resolvconf
|
||||
- import_tasks: dist-upgrade.yml
|
||||
when: dist_upgrade
|
||||
- import_tasks: packages.yml
|
||||
- import_tasks: ntp.yml
|
||||
- import_tasks: remove-unneeded-pkgs.yml
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
---
|
||||
- name: Install the basic packages
|
||||
apt: pkg={{ item }} state=installed
|
||||
apt: pkg={{ item }} state=installed update_cache=yes cache_valid_time=1800
|
||||
with_items: '{{ default_python_packages }}'
|
||||
tags: packages
|
||||
|
||||
- name: Install software-properties-common if needed
|
||||
apt: pkg=software-properties-common state=installed
|
||||
apt: pkg=software-properties-common state=installed update_cache=yes cache_valid_time=1800
|
||||
when: is_ubuntu
|
||||
tags: packages
|
||||
|
||||
|
@ -88,12 +88,12 @@
|
|||
tags: packages
|
||||
|
||||
- name: install common packages
|
||||
apt: pkg={{ item }} state={{ pkg_state }}
|
||||
apt: pkg={{ item }} state={{ pkg_state }} update_cache=yes cache_valid_time=1800
|
||||
with_items: '{{ common_packages }}'
|
||||
tags: [ 'packages', 'common_pkgs' ]
|
||||
|
||||
- name: Install additional packages, if any
|
||||
apt: pkg={{ item }} state={{ pkg_state }}
|
||||
apt: pkg={{ item }} state={{ pkg_state }} update_cache=yes cache_valid_time=1800
|
||||
with_items: '{{ additional_packages | default([]) }}'
|
||||
tags: [ 'packages', 'common_pkgs', 'additional_packages' ]
|
||||
|
||||
|
|
Loading…
Reference in New Issue