added a small shell file to setup ansible on osx

This commit is contained in:
James Tombleson 2019-04-07 14:27:08 -07:00
parent 4c7a76b657
commit 42f7a9f79e
2 changed files with 42 additions and 1 deletions

28
installAnsible.sh Normal file
View File

@ -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

View File

@ -3,5 +3,18 @@
hosts: windows hosts: windows
tasks: 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