Updated Docs
Updated InstallDocker to support Ubuntu dist release
Added some Vagrant support
Adjusting Nagios still
This commit is contained in:
James Tombleson 2019-04-18 11:19:08 -07:00
parent 6f4ecfcb37
commit 6ffc3201f5
7 changed files with 70 additions and 38 deletions

View File

@ -17,13 +17,12 @@ chmod 777 installAnsible.sh
#### Windows
```powershell
$url = "https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1"
$file = "$env:temp\ConfigureRemotingForAnsible.ps1"
(New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file)
powershell.exe -ExecutionPolicy ByPass -File $file
```
Review the installAnsible.sh for quick setup.
Make sure you run the commands out of this folder so things work as desired.
## Configuration
I have a basic configuration file in place at the root of this folder for anisble to find.
@ -32,10 +31,6 @@ I have a basic configuration file in place at the root of this folder for anisbl
I have a template file in place that should only be used as a refrence. Make a copy of that file and name it hosts then update that file.
## Testing Inventory
### Testing Linux devices
```bash
@ -48,5 +43,7 @@ ansible linux -i hosts -m ping
ansible windows -i hosts -m win_ping
```
## Unit Testing
Still in the works

View File

@ -35,7 +35,7 @@
become: true
become_method: sudo
apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu/ bionic stable"
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu/ {{ ansible_distribution_release }} stable"
state: present
- name: Update Repos

View File

@ -1,28 +0,0 @@
- 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

View File

@ -0,0 +1,11 @@
- name: Install Nagios Core Dependancies
hosts: nagios
tasks:
- name: Update apt
apt:
update_cache: yes

View File

@ -0,0 +1,12 @@
- name: Install Nagios Core
hosts: nagios
tasks:
- include_role:
name: oefenweb.nagios-server
# vars:
# nagios_version: 4.4.3
# nagios_users:
#- user: nagiosadmin
#- pass: password

View File

@ -32,3 +32,8 @@ sudo pip install 'ansible[azure]'
echo "[pip] Installing Docker module"
sudo pip install docker
echo "Installing roles from galaxy.ansible.com"
echo "[galaxy] Nagios Core - Server Side "
ansible-galaxy install networklore.nagios

35
scripts/installVagrant.sh Executable file
View File

@ -0,0 +1,35 @@
# This will install Vagrant on the device
#1.0 Started to add Vagrant 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/vagrant/2.2.4/vagrant_2.2.4_linux_amd64.zip
unzip vagrant_2.2.4_linux_amd64.zip
# Remove the zip
rm vagrant_2.2.4_linux_amd64.zip
# copy over to bin
sudo cp vagrant /usr/bin/vagrant
rm vagrant
echo "Installing VirtualBox 6"
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian cosmic contrib"
sudo apt update
sudo apt install virtualbox-6.0
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