- add Retic repo
- yum install restic
add a Restic credential file to root
vim /root/.restic
{ | |
"name": "devsaltmaster", | |
"host": "devsaltmaster", | |
"protocol": "sftp", | |
"port": 22, | |
"username": "root", | |
"password": "xxx", | |
// or use "privateKeyPath": "/home/user/.ssh/id_rsa", | |
"remotePath": "/srv/saltstack", | |
"uploadOnSave": true, |
#!/usr/bin/env python | |
import json | |
import salt.client | |
import salt.config | |
import salt.loader | |
import salt.modules.smtp | |
notify = 'admin@company.com' | |
smtp = 'localhost' |
#!/bin/bash | |
# Runs Restic backup on a schedule via cron, emails with status | |
# 1. add a cred file with your repo logins to /etc/restic/cred | |
# 2. | |
FROM="restic@$(hostname)" | |
EMAIL="user@company.com" | |
LOG="/var/log/restic.log" | |
RDIR="/etc/restic" |
#!/bin/bash | |
# this script creates an IPIP Tunnel | |
# tested for CENTOS 6 & 7 | |
#---------------------------- | |
# CONFIGURATION | |
#---------------------------- | |
# name of tunnel | |
name='tun_test' |
# Custom Execution Module - SUDO ACCESS | |
# tested for Centos 7 | |
import salt | |
import time | |
import os | |
import logging | |
import re | |
from datetime import datetime, timedelta | |
import subprocess |
#!/bin/bash | |
# Installs Python 3.7 on Centos 7 | |
yum -y install libffi-devel gcc openssl-devel bzip2-devel | |
cd /usr/src | |
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz | |
tar xzf Python-3.7.0.tgz | |
cd Python-3.7.0/ |
#!/bin/bash | |
# Secure OpenVPN server installer for Debian, Ubuntu, CentOS and Arch Linux | |
# https://github.com/Angristan/OpenVPN-install | |
# Verify root | |
if [[ "$EUID" -ne 0 ]]; then | |
echo "Sorry, you need to run this as root" | |
exit 1 |
#!/bin/bash | |
CURR_USER="$(whoami)" | |
ANACONDA_URL="https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh" | |
_DB_PASSWORD="airflow992x" | |
_IP=$(hostname -I | cut -d' ' -f1) | |
while getopts "a:p:h" opt; do | |
case $opt in | |
a) ANACONDA_URL="$OPTARG";; | |
p) _DB_PASSWORD="$OPTARG";; |
# Injects an external cert into 'cacerts' | |
- hosts: target | |
vars: | |
cert_server: ldap.server.company:636 # FQDN | |
cert_alias: ldap.server | |
app: myApp | |
app_install_dir: "/opt/application" |