From babd9bbe8120a5828676fd48d382981f18ed51fd Mon Sep 17 00:00:00 2001 From: shockrah Date: Fri, 10 Dec 2021 00:47:38 -0800 Subject: [PATCH] - removing fluff scripts + new script to easily pick out playbooks to run --- .gitignore | 4 ++-- playbooks/connect.sh | 2 +- playbooks/gamma/init.yml | 13 ------------- playbooks/run-play.sh | 8 ++++++++ 4 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 playbooks/gamma/init.yml create mode 100644 playbooks/run-play.sh diff --git a/.gitignore b/.gitignore index e5f71a6..1c19f42 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,5 @@ infra/out.plan infra/terraform.tfstate infra/terraform.tfstate.backup playbooks/hosts.ini -playbooks/ssh/config -playbooks/ssh/known_hosts +playbooks/.ssh/ +playbooks/.env/ diff --git a/playbooks/connect.sh b/playbooks/connect.sh index 5fe8ecf..6a90bda 100644 --- a/playbooks/connect.sh +++ b/playbooks/connect.sh @@ -3,4 +3,4 @@ # -_- -ssh -F ssh/config -o UserKnownHostsFile=ssh/known_hosts $@ +ssh -F .ssh/config -o UserKnownHostsFile=.ssh/known_hosts $@ diff --git a/playbooks/gamma/init.yml b/playbooks/gamma/init.yml deleted file mode 100644 index cb60ec2..0000000 --- a/playbooks/gamma/init.yml +++ /dev/null @@ -1,13 +0,0 @@ -# This server is going to have to server as an ansible host -# ---- -- hosts: gamma - remote_user: ubuntu - become: yes - become_method: sudo - tasks: - - name: Update system packages to latest - apt: - update_cache: yes - upgrade: full - diff --git a/playbooks/run-play.sh b/playbooks/run-play.sh new file mode 100644 index 0000000..74aad71 --- /dev/null +++ b/playbooks/run-play.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -x + +ansible-playbook \ + -i hosts.ini \ + -e @.env/main.yml \ + --ask-vault-pass \ + $1