2019-04-06 11:28:01 -07:00
|
|
|
# Ansible
|
|
|
|
|
2019-04-17 11:46:45 -07:00
|
|
|
This repo contains my configuration and setup for my ansible use. Use at your own risk.
|
|
|
|
|
|
|
|
## Installers
|
|
|
|
|
|
|
|
### New hosts
|
|
|
|
|
|
|
|
#### Linux
|
|
|
|
|
|
|
|
```bash
|
|
|
|
wget https://github.com/luther38/Ansible/blob/master/scripts/installAnsible.sh
|
|
|
|
chmod 777 installAnsible.sh
|
|
|
|
./installOpenSSH.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Windows
|
|
|
|
|
|
|
|
```powershell
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2019-04-08 08:54:28 -07:00
|
|
|
Review the installAnsible.sh for quick setup.
|
2019-04-06 11:28:01 -07:00
|
|
|
|
2019-04-08 08:54:28 -07:00
|
|
|
Make sure you run the commands out of this folder so things work as desired.
|
2019-04-06 11:28:01 -07:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
2019-04-08 08:54:28 -07:00
|
|
|
I have a basic configuration file in place at the root of this folder for anisble to find.
|
2019-04-06 11:28:01 -07:00
|
|
|
|
2019-04-08 08:54:28 -07:00
|
|
|
## Inventory
|
2019-04-06 11:28:01 -07:00
|
|
|
|
2019-04-08 08:54:28 -07:00
|
|
|
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.
|
2019-04-06 11:28:01 -07:00
|
|
|
|
2019-04-08 08:54:28 -07:00
|
|
|
## Testing Inventory
|
2019-04-06 11:28:01 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-08 08:54:28 -07:00
|
|
|
### Testing Linux devices
|
2019-04-06 11:28:01 -07:00
|
|
|
|
2019-04-08 08:54:28 -07:00
|
|
|
```bash
|
|
|
|
ansible linux -i hosts -m ping
|
|
|
|
```
|
2019-04-06 11:28:01 -07:00
|
|
|
|
2019-04-08 08:54:28 -07:00
|
|
|
### Testing Windows devices
|
2019-04-06 11:28:01 -07:00
|
|
|
|
|
|
|
```bash
|
2019-04-08 08:54:28 -07:00
|
|
|
ansible windows -i hosts -m win_ping
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|