This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
## Tasks file for yum-update | |
# Runs 'yum update' on servers. It can apply full or security only updates, as well as reboot if needed. | |
# Tags: | |
# - full - Performs a full update | |
# - security - Performs security update only | |
# - reboot - Triggers reboot if needed | |
# Security Updates ------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Delete yum cache and run yum check-update | |
# Add your hosts accordingly below | |
hosts: webserver | |
become: yes | |
tasks: | |
- name: Check /var usage with df command | |
shell: | | |
df -hT /var | awk '{print $6}' | tail -1 | tr -d '%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
printf '%-51s%s\n' 'PACKAGE NAME' 'DATE' | |
printf '%0.s=' $(seq 1 50) | |
printf ' ' | |
printf '%0.s=' $(seq 1 32) | |
printf '\n' | |
rpm -qa --qf '%{INSTALLTIME} %-50{NAME} %{INSTALLTIME:date}\n' | sort -nr | cut -d' ' -f2- | |
} | less |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function apt-history() { | |
local install_date login_user command type changed usage | |
usage="apt-history - Displays content from /var/log/apt/history* in a table format (similar to yum history)" | |
if [ $# -gt 0 ] && [[ "$1" == "-h" ]] ; then | |
echo "$usage" | |
return 0 | |
elif [ $# -gt 0 ] ; then | |
echo "This function does not accept options" | |
return 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum-check-security-updates () { | |
local OPTERR OPTIND OPT OPTARG v_usage v_help v_mode v_type v_update_list | |
v_usage="yum-check-security-updates [-s|-l|-c] -t [m[moderate]|i[important]|c[critical]]" | |
v_help="$v_usage | |
OPTIONS: | |
-s,[no arg] | |
Shows a summary (default option) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
## tasks file for apt-update | |
# This role will perform both full and security only updates on APT based distros with a possible reboot | |
# Tags: | |
# - full - Performs a full update | |
# - security - Performs security update only | |
# - reboot - Triggers reboot if needed | |
# Security Updates ------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
# Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
# Virtual Me2Me implementation. This script runs and manages the processes | |
# required for a Virtual Me2Me desktop, which are: X server, X desktop | |
# session, and Host process. | |
# This script is intended to run continuously as a background daemon | |
# process, running under an ordinary (non-root) user account. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################ | |
################################################################################ | |
# Name: desktop-led.sh | |
# Usage: | |
# Description: Turns off Desktop lights when monitors is off | |
# Created: | |
# Copyright 2014, Victor Mendonca - http://victormendonca.com | |
# - https://github.com/victorbrca | |
# License: Released under the terms of the GNU GPL license v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################ | |
################################################################################ | |
# Name: wemo_control.sh | |
# Usage: [IP|network] [on|off|getstate|getsignal|getname|find] | |
# Description: | |
# Created: 2015-07-30 | |
# Last Modified: | |
# Copyright 2014, Victor Mendonca - http://victormendonca.com | |
# - https://github.com/victorbrca |