Skip to content

Instantly share code, notes, and snippets.

View dominusceo's full-sized avatar
🏅
Focusing

Ricardo David Carrillo Sanchez dominusceo

🏅
Focusing
View GitHub Profile
@xoyabc
xoyabc / ansible-vault.md
Created June 20, 2018 17:54 — forked from hvanderlaan/ansible-vault.md
Ansible-vault example

Ansible vault example

New in Ansible 1.5, “Vault” is a feature of ansible that allows keeping sensitive data such as passwords or keys in encrypted files, rather than as plaintext in your playbooks or roles. These vault files can then be distributed or placed in source control. To enable this feature, a command line tool, ansible-vault is used to edit files, and a command line flag –ask-vault-pass or –vault-password-file is used. Alternately, you may specify the location of a password file or command Ansible to always prompt for the password in your ansible.cfg file. These options require no command line flag usage.

Requirements

# Use the high-colour menu system. This file, and the low-colour 'menu.c32'
# version, are provided by the syslinux package and can be found in the
# '/var/lib/tftpboot' directory. Copy it to '/var/lib/tftpboot'.
UI vesamenu.c32
# Time out and use the default menu option. Defined as tenths of a second.
TIMEOUT 2600
# Prompt the user. Set to '1' to automatically choose the default option. This
# is really meant for files matched to MAC addresses.
@coderofsalvation
coderofsalvation / is_array.bash
Created January 11, 2014 21:44
check if variable is array, returns 0 on success, 1 otherwise
# check if variable is array, returns 0 on success, 1 otherwise
# @param mixed
is_array()
{ #detect if arg is an array, returns 0 on sucess, 1 otherwise
[ -z "$1" ] && return 1
if [ -n "$BASH" ]; then
declare -p ${1} 2> /dev/null | grep 'declare \-a' >/dev/null && return 0
fi
return 1
@mattrude
mattrude / changepassword.php
Created October 31, 2010 23:49
LDAP PHP Change Password Page
<?php
/**
* LDAP PHP Change Password Webpage
* @author: Matt Rude <http://mattrude.com>
* @website: http://technology.mattrude.com/2010/11/ldap-php-change-password-webpage/
*
*
* GNU GENERAL PUBLIC LICENSE
* Version 2, June 1991