Merge pull request #3 from luther38/windows-testing
Moved scripts out of the root
This commit is contained in:
commit
c071feab12
@ -1,28 +0,0 @@
|
||||
|
||||
# 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
|
||||
|
||||
|
28
playbook/linux/nagios/deployNagios.yml
Normal file
28
playbook/linux/nagios/deployNagios.yml
Normal file
@ -0,0 +1,28 @@
|
||||
- name: Install Nagios Core
|
||||
hosts: nagios
|
||||
|
||||
tasks:
|
||||
- name: Install requrements
|
||||
apt:
|
||||
name: {{ packages }}
|
||||
vars:
|
||||
packages:
|
||||
- install
|
||||
- build-essential
|
||||
- libgd-dev
|
||||
- openssl
|
||||
- libssl-dev
|
||||
- unzip
|
||||
- apache2
|
||||
|
||||
- name: Make Group: Nagios
|
||||
group:
|
||||
name: nagios
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Make User: Nagios
|
||||
|
||||
|
8
playbook/linux/nagios/readme.md
Normal file
8
playbook/linux/nagios/readme.md
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
# Nagios Playbooks
|
||||
|
||||
This is where all nagios related playbooks will be stored for now.
|
||||
|
||||
## Hosts
|
||||
|
||||
The playbooks will define that 'hosts: nagios' Anything related to nagios configuration and security will be found here.
|
34
scripts/installAnsible.sh
Normal file
34
scripts/installAnsible.sh
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
# Shell script to install ansible and other requirements.
|
||||
# Currently only supports darwin for now.
|
||||
# Ubuntu installer will be soon
|
||||
|
||||
# 1.1: Added sudo command and justed the layout
|
||||
|
||||
|
||||
echo "OS: $OSTYPE"
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
|
||||
echo "[brew] Intalling Ansible"
|
||||
brew install ansible
|
||||
|
||||
elif [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||
echo "[sudo] Install Ansible"
|
||||
sudo apt update
|
||||
sudo apt install software-properties-common
|
||||
sudo apt-add-repository --yes --update ppa:ansible/ansible
|
||||
sudo apt install ansible
|
||||
else
|
||||
echo "Running on a unsupported OS"
|
||||
echo "No changes where made"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "[pip] Installing WinRM module"
|
||||
sudo pip install pywinrm
|
||||
|
||||
echo "[pip] Installing Azure module"
|
||||
sudo pip install 'ansible[azure]'
|
||||
|
||||
echo "[pip] Installing Docker module"
|
||||
sudo pip install docker
|
@ -21,6 +21,7 @@ sudo systemctl status ssh
|
||||
|
||||
echo "Install is complete. Test ansible!"
|
||||
echo "If you want to change the port, check this scripts config on how to"
|
||||
echo "With the ansible device you will want to connect to this host to get the SSH key from it before testing."
|
||||
|
||||
# Edit /etc/ssh/sshd_config
|
||||
# Uncomment #Port 22
|
29
scripts/installTerraform.sh
Normal file
29
scripts/installTerraform.sh
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
# This will install Terraform on the device
|
||||
|
||||
#1.0 Started to add Terraform to the project
|
||||
|
||||
echo "OS: $OSTYPE"
|
||||
if [[ "$OSTYPE" == "darin"* ]]; then
|
||||
|
||||
# I use debian so sudo
|
||||
elif [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||
|
||||
# Download current release
|
||||
wget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip
|
||||
|
||||
unzip terraform_0.11.13_linux_amd64.zip
|
||||
|
||||
# Remove the zip
|
||||
rm terraform_0.11.13_linux_amd64.zip
|
||||
|
||||
# copy over to bin
|
||||
sudo cp terraform /bin/terraform
|
||||
|
||||
rm terraform
|
||||
|
||||
else
|
||||
echo "You are running on a OS that is not supported by this script at this time."
|
||||
echo "No changes have been made."
|
||||
exit
|
||||
fi
|
Loading…
Reference in New Issue
Block a user