- Changed: Folder Structure

- Added: Working Ansible PoC
This commit is contained in:
Carlos Sousa
2021-07-21 14:45:41 +02:00
parent 4d07ae4ab3
commit 9cd102ae07
11 changed files with 25 additions and 19 deletions

View File

@@ -1,2 +0,0 @@
PIUSER=pi
PIPASSWORD=example

View File

@@ -5,15 +5,11 @@ Playbooks and ansible configs to deploy different systems
### Task
- Make a copy of .env-sample
```
cp .env-sample .env
```
- Edit with your own values
- Change the IPs under <fileName>Hosts.yml
- Run the playbook
```
ansible-playbook -i <fileName>Hosts.yml <fileName>Playbook.yml
ansible-playbook -i hosts deploy.yml
```
### Result

View File

@@ -1,5 +0,0 @@
all:
hosts:
192.168.217.100:
ansible_user: ${PIUSER}
ansible_password: ${PIPASSWORD}

View File

@@ -1,7 +0,0 @@
---
- name: Get SilentGreen Pi to Working State
hosts: all
tasks:
- name: Ping Pi
action: ping

View File

@@ -0,0 +1,3 @@
[defaults]
inventory = hosts
log_path = /var/log/ansible.log

View File

@@ -0,0 +1,21 @@
---
- hosts: localhost
connection: local
become: true
tasks:
- name: install packages
package:
name:
- htop
- keepass2
- notepadqq
- remmina
- name: cleanup package cache
apt:
autoclean: yes
- name: autoremove orphan packages
apt:
autoremove: yes