initial checkin

This commit is contained in:
Radar231 2021-07-22 23:14:57 -04:00
commit 098109cc1e
2 changed files with 39 additions and 0 deletions

8
README.md Normal file
View File

@ -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.

31
tasks/main.yml Normal file
View File

@ -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