Skip to content

Instantly share code, notes, and snippets.

@Habbie
Habbie / bigger
Last active March 16, 2018 16:42
$ dig -t txt foo2.example.net @127.0.0.1
; <<>> DiG 9.11.2 <<>> -t txt foo2.example.net @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62695
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
@halberom
halberom / mail_body.j2
Created September 7, 2017 09:51
ansible - example of using mail module to send one email for all hosts
# templates/mail_body.j2
{% for host in play_hosts %}
The {{ host }} says {{ hostvars[host]['result']['stdout'] }}
{% endfor %}
@stevejenkins
stevejenkins / unifi_ssl_import.sh
Last active August 30, 2021 03:57
Import and use SSL certificates (including Let's Encrypt) with the Ubiquiti UniFi Controller on Unix/Linux Systems
# MOVED TO https://github.com/stevejenkins/unifi-linux-utils
---
- name: create some vms
hosts: localhost
connection: local
vars_prompt:
- name: "vcenter_host"
prompt: "Enter vcenter host"
private: no
default: "vcsa"
- name: "vcenter_user"
---
- hosts: db-vms # set to specific inventory host group or set to all for every host in inventory for play
vars:
config_lvm: false # must be set to true in order to execute any tasks in play (failsafe option :)- )
create: false # set to true if creating a new logical volume (do not set extend or resize to true)
resize: false # set to true if resizing the logical volume (do not set create to true)
extend: false # set to true if extending the logical volume (do not set create to true)
current_disk: '/dev/sda5' # set to your current disk device already setup in lvm
new_disk: '/dev/sdb' # set to new disk being added to volume group
new_mntp: '/var/lib/mysql' # set to the desired mount
@brianredbeard
brianredbeard / logstash.conf
Last active May 2, 2016 20:28
logstash config to break out systemd output from `/usr/lib/systemd/systemd-journal-upload`
input {
tcp {
port => 19532
type => journald
}
}
filter {
if [type] == "journald" {
multiline {
@d11wtq
d11wtq / docker-ssh-forward.bash
Created January 29, 2014 23:32
How to SSH agent forward into a docker container
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash