Pembuatan fungsi awal

master
Ronggo Radityo 2018-09-25 19:34:38 +07:00
parent 37eec70e1a
commit 912ab3ff61
2 changed files with 32 additions and 41 deletions

View File

@ -1,56 +1,28 @@
galaxy_info: galaxy_info:
author: your name author: Ronggo Radityo
description: your description description: Update Debian Server
company: your company (optional) company: Kota Magelang
# If the issue tracker for your role is not on github, uncomment the # If the issue tracker for your role is not on github, uncomment the
# next line and provide a value # next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker # issue_tracker_url: http://example.com/issue/tracker
# Some suggested licenses: license: license (BSD, MIT)
# - BSD (default)
# - MIT
# - GPLv2
# - GPLv3
# - Apache
# - CC-BY
license: license (GPLv2, CC-BY, etc)
min_ansible_version: 1.2 min_ansible_version: 1.2
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
# Galaxy will use this branch. During import Galaxy will access files on
# this branch. If Travis integration is configured, only notifications for this
# branch will be accepted. Otherwise, in all cases, the repo's default branch
# (usually master) will be used.
#github_branch:
# #
# platforms is a list of platforms, and each platform has a name and a list of versions. # platforms is a list of platforms, and each platform has a name and a list of versions.
# #
# platforms: platforms:
# - name: Fedora - name: Debian
# versions: versions:
# - all - 8
# - 25 - 9
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
galaxy_tags: [] galaxy_tags:
# List tags for your role here, one per line. A tag is a keyword that describes - linux
# and categorizes the role. Users find roles by searching for tags. Be sure to - debian
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: [] dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above, # List your role dependencies here, one per line. Be sure to remove the '[]' above,

View File

@ -1,2 +1,21 @@
--- ---
# tasks file for roles/debian-update # tasks file for roles/debian-update
- name: Update packages list
apt:
update_cache: yes
when: ansible_os_family == 'Debian'
- name: Upgrade packages
apt:
upgrade: yes
when: ansible_os_family == 'Debian'
- name: Remove dependencies that are no longer required
apt:
autoremove: yes
when: ansible_os_family == 'Debian'
- name: Remove useless packages from the cache
apt:
autoclean: yes
when: ansible_os_family == 'Debian'