-
-
Save jaycdave88/c1b8c8c93fce0ce0fab9851e67a252cd to your computer and use it in GitHub Desktop.
Setting up Ansible control machine - targets are going to be Windows hosts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set up CentOS to act as an Ansible controller | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# ensure CentOS all up-to-date | |
yum update -y | |
# epel is to be used for pip | |
yum install epel-release -y | |
# install pip via epel repo | |
yum install python-pip -y | |
# install Ansible | |
yum install ansible -y | |
# Fix for "winrm or requests is not installed" Ansible error | |
# https://access.redhat.com/solutions/3356681 | |
pip install "pywinrm>=0.2.2" | |
# datadogpy to be used by the ansible callback plugin | |
pip install datadog | |
# install DDatadog Ansible role | |
ansible-galaxy install Datadog.datadog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment