initial checkin
This commit is contained in:
commit
098109cc1e
|
@ -0,0 +1,8 @@
|
|||
# Ansible Role: update_cache
|
||||
|
||||
## Introduction
|
||||
|
||||
This role will update the package cache on the target host.
|
||||
|
||||
This role should work on both Ubuntu and CentOS based hosts.
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
###########################################################################
|
||||
#
|
||||
# This role will update the package cache on the target host.
|
||||
#
|
||||
# This role should work on both Ubuntu and CentOS based hosts.
|
||||
#
|
||||
###########################################################################
|
||||
#
|
||||
# NOTE:
|
||||
# The following variable(s) must be specified in the calling playbook (usually
|
||||
# done by doing a 'gather_facts' action);
|
||||
#
|
||||
# {{ ansible_distribution }}
|
||||
#
|
||||
###########################################################################
|
||||
# tasks file for update_cache
|
||||
|
||||
- debug: msg="Updating package cache"
|
||||
|
||||
- name: updated package cache (Ubuntu)
|
||||
apt:
|
||||
update-cache: true
|
||||
when: ansible_distribution == "Ubuntu" or ansible_distribution == "Pop!_OS"
|
||||
|
||||
- name: update package cache (CentOS)
|
||||
yum:
|
||||
update_cache: true
|
||||
when: ansible_distribution == "CentOS"
|
||||
|
||||
# EOF
|
Loading…
Reference in New Issue