Turns Ansible log outputs into plain JSON strings and sends them to an Elasticsearch cluster.
Place the script in your playbook's plugins/callbacks/ directory.
Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target| service salt-minion stop | |
| rm -f /etc/salt/pki/minion/minion_master.pub | |
| echo "master: salt" > /etc/salt/minion | |
| service salt-minion start |
| #!/bin/bash | |
| # Forticlient SSL VPN Client / expect | |
| # -------------------------------------------- | |
| # CONFIGURATION | |
| FORTICLIENT_PATH="" |
| DISPLAY=:0 xinput --set-prop 'FT5406 memory based driver' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1 |
| echo "Public name: $(hostname)-incrementaltech.$(wget -qO- --header=Metadata:true 'http://instance-data/metadata/instance/compute/location?api-version=2017-04-02&format=text').cloudapp.azure.com"; | |
| echo "Public ip: $(wget -qO- --header=Metadata:true 'http://instance-data/metadata/instance/network/interface/0/ipv4/ipAddress/0/publicIpAddress?api-version=2017-04-02&format=text')"; | |
| echo "Local hostname: $(hostname)" | |
| echo "Private ip: $(wget -qO- --header=Metadata:true 'http://instance-data/metadata/instance/network/interface/0/ipv4/ipAddress/0/privateIpAddress?api-version=2017-04-02&format=text')"; | |
| echo "Zone: $(wget -qO- --header=Metadata:true 'http://instance-data/metadata/instance/compute/location?api-version=2017-04-02&format=text')"; | |
| echo "Load: $(uptime | awk -F'[a-z]:' '{ print $2}')"; |
| kubectl create clusterrolebinding user-admin-binding --clusterrole=cluster-admin --user=$(gcloud config get-value account) | |
| kubectl create serviceaccount tiller --namespace kube-system | |
| kubectl create clusterrolebinding tiller-admin-binding --clusterrole=cluster-admin --serviceaccount=kube-system:tiller | |
| kubectl create clusterrolebinding --clusterrole=cluster-admin --serviceaccount=default:default concourse-admin | |
| helm init --service-account=tiller |
| #!/bin/bash | |
| search_term=${1-local/} | |
| helm update;helm search $search_term | sed -n '1!p' | awk -v login=$2 '{\ | |
| v_count=split($2, versionArray, ".");\ | |
| q_count=split(versionArray[3], qualifierArray, "-");\ | |
| qualifierArray[1]=qualifierArray[1]+1;\ | |
| qualifier=qualifierArray[1];\ | |
| for(i=2;i<=q_count;i++)\ |
| # Inspired by: https://stackoverflow.com/questions/42170380/how-to-add-users-to-kubernetes-kubectl | |
| # this script creates a service account (user1) on a Kubernetes cluster (tested with AWS EKS 1.9) | |
| # prereqs: a kubectl ver 1.10 installed and proper configuration of the heptio authenticator | |
| # this has been tested on Linux in a Cloud9 environment (for MacOS the syntax may be slightly different) | |
| ************************************************** | |
| ******* Create an account ******* | |
| ************************************************** | |
| # Create service account for user user1 | |
| kubectl create sa user1 |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <!-- Your stuff here... --> | |
| <build> | |
| <plugins> | |
| <plugin> | |
| <groupId>org.apache.tomcat.maven</groupId> | |
| <artifactId>tomcat7-maven-plugin</artifactId> |