From 42f7a9f79e9877fcabbb9d49ca31e8d35b35f2e7 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Sun, 7 Apr 2019 14:27:08 -0700 Subject: [PATCH] added a small shell file to setup ansible on osx --- installAnsible.sh | 28 +++++++++++++++++++++ playbook/windows/InstallSecurityUpdates.yml | 15 ++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 installAnsible.sh diff --git a/installAnsible.sh b/installAnsible.sh new file mode 100644 index 0000000..4b94e57 --- /dev/null +++ b/installAnsible.sh @@ -0,0 +1,28 @@ + +# Shell script to install ansible and other requirements. +# Currently only supports darwin for now. +# Ubuntu installer will be soon + + +if [[ "$OSTYPE" == "darwin"* ]]; then + + echo "OS: Dawriw" + echo "[brew] Intalling Ansible" + brew install ansible + + echo "[pip] Installing WinRM module" + sudo pip install pywinrm + + echo "[pip] Installing Azure module" + sudo pip install 'ansible[azure]' + + echo "[pi] Installing Docker module" + sudo pip install docker + +else + echo "Running on a unsupported OS" + echo "No changes where made" + +fi + + diff --git a/playbook/windows/InstallSecurityUpdates.yml b/playbook/windows/InstallSecurityUpdates.yml index dc0947d..233f64e 100644 --- a/playbook/windows/InstallSecurityUpdates.yml +++ b/playbook/windows/InstallSecurityUpdates.yml @@ -3,5 +3,18 @@ hosts: windows tasks: - - name: + - name: Check for updates. Log the needed updates. + win_updates: + state: searched + category_name: + - SecurityUpdates + - CriticalUpdates + - UpdateRollups + #log_path: C:\ansible-Updates.txt + register: updates + + - name: return report + debug: + var: updates +