add create ssh config script
This commit is contained in:
11
ansible/create_ssh_config.sh
Executable file
11
ansible/create_ssh_config.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Author: Landon Dyck
|
||||
# This will use an ansible host file to create an ssh config file and ensure it
|
||||
# is included in your ssh config
|
||||
# Usage: $ ./create_ssh_config.sh [HOST_FILE=ansible/hosts]
|
||||
PATH=${PWD}/env/bin:${PATH}
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
HOST_FILE="${HOST_FILE:-ansible/hosts}"
|
||||
|
||||
ansible-playbook $SCRIPT_DIR/create_ssh_config.yml -i $HOST_FILE
|
||||
Reference in New Issue
Block a user