Cron Job Wrapper Wish List
I want a script that will give me:
- Logging
- Log purging!
- Email errors!
- Prevent duplicate processes! (flock)
- Source an environment file!
- Anything else?
# replaces this file /opt/vagrant/embedded/gems/gems/vagrant-1.7.4/plugins/providers/virtualbox/action/sane_defaults.rb | |
# NOTE: if using a different Vagrant version, adjust the version field accordingly | |
# NOTE2: only the sections with the IRVING comment have been changed from the default | |
require "log4r" | |
module VagrantPlugins | |
module ProviderVirtualBox | |
module Action | |
class SaneDefaults |
I want a script that will give me:
#version=RHEL8 | |
text | |
repo --name="Minimal" --baseurl=file:///run/install/sources/mount-0000-cdrom/Minimal | |
%packages | |
@^minimal-environment | |
@headless-management | |
@legacy-unix | |
@standard |
If .DS_Store was never added to your git repository, simply add it to your .gitignore file.
.gitignore
In your the root directory of your app and simply write
import json | |
# Import smtplib for the actual sending function | |
import smtplib | |
# Import the email modules we'll need | |
from email.mime.text import MIMEText | |
from email.mime.multipart import MIMEMultipart | |
from datetime import datetime | |
def send_email(data): |
#!/bin/bash | |
host=localhost | |
db='home_assistant' | |
measurements=$1 | |
measurements=($(influx --host $host --execute 'show measurements' --database=$db | grep "$1")) | |
if (( ${#measurements[@]} )) | |
then |
This Gist shows how you can encrypt/decrypt variables with KMS during your Ansible playbook execution. While google searching I couldn't find anything useful on the subject.
Let's say your project has a folder of playbooks called plays
.
In that folder, create a folder called filter_plugins
and insert kms_filters.py
(included in this gist)
service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval
(in minutes)service.beta.kubernetes.io/aws-load-balancer-access-log-enabled
(true|false)service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags
(comma-separated list of key=value)service.beta.kubernetes.io/aws-load-balancer-backend-protocol
(http|https|ssl|tcp)service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled
(true|false)Install the OpenSSL on Debian based systems
sudo apt-get install openssl
# Run this script as an Admin user and get a list of all WiFi passwords. | |
$listProfiles = netsh wlan show profiles | Select-String -Pattern "All User Profile" | %{ ($_ -split ":")[-1].Trim() }; | |
$listProfiles | foreach { | |
$profileInfo = netsh wlan show profiles name=$_ key="clear"; | |
$SSID = $profileInfo | Select-String -Pattern "SSID Name" | %{ ($_ -split ":")[-1].Trim() }; | |
$Key = $profileInfo | Select-String -Pattern "Key Content" | %{ ($_ -split ":")[-1].Trim() }; | |
[PSCustomObject]@{ | |
WifiProfileName = $SSID; | |
Password = $Key | |
} |