From c389cfb2203bcab2b826bae293dae08bbb64ac7c Mon Sep 17 00:00:00 2001 From: shockrah Date: Fri, 26 Nov 2021 22:01:25 -0800 Subject: [PATCH] + Playbook for simple echo's + Init play for gamma --- .gitignore | 1 + playbooks/athens-common/touch.yml | 14 ++++++++++++++ playbooks/connect.sh | 6 ++++++ playbooks/gamma/init.yml | 13 +++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 playbooks/athens-common/touch.yml create mode 100644 playbooks/connect.sh create mode 100644 playbooks/gamma/init.yml diff --git a/.gitignore b/.gitignore index e5b10b6..e5f71a6 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ infra/terraform.tfstate infra/terraform.tfstate.backup playbooks/hosts.ini playbooks/ssh/config +playbooks/ssh/known_hosts diff --git a/playbooks/athens-common/touch.yml b/playbooks/athens-common/touch.yml new file mode 100644 index 0000000..2659d19 --- /dev/null +++ b/playbooks/athens-common/touch.yml @@ -0,0 +1,14 @@ +# This is purely here to check if things are +# working properly +--- +- hosts: alpha, beta, gamma, sigma + remote_user: ubuntu + tasks: + - name: Echo + shell: echo 'asdfasdfasdf' + + - name: Sample web request + get_url: + url: https://google.com + + diff --git a/playbooks/connect.sh b/playbooks/connect.sh new file mode 100644 index 0000000..5fe8ecf --- /dev/null +++ b/playbooks/connect.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# -_- + + +ssh -F ssh/config -o UserKnownHostsFile=ssh/known_hosts $@ diff --git a/playbooks/gamma/init.yml b/playbooks/gamma/init.yml new file mode 100644 index 0000000..cb60ec2 --- /dev/null +++ b/playbooks/gamma/init.yml @@ -0,0 +1,13 @@ +# 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 +