mirror of
https://github.com/zebrajr/HomeLab.git
synced 2026-01-15 12:15:06 +00:00
- Changed: Folder Structure
- Added: Working Ansible PoC
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
PIUSER=pi
|
||||
PIPASSWORD=example
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
all:
|
||||
hosts:
|
||||
192.168.217.100:
|
||||
ansible_user: ${PIUSER}
|
||||
ansible_password: ${PIPASSWORD}
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
|
||||
- name: Get SilentGreen Pi to Working State
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: Ping Pi
|
||||
action: ping
|
||||
3
xubuntuDaily/ansible/ansible.cfg
Normal file
3
xubuntuDaily/ansible/ansible.cfg
Normal file
@@ -0,0 +1,3 @@
|
||||
[defaults]
|
||||
inventory = hosts
|
||||
log_path = /var/log/ansible.log
|
||||
21
xubuntuDaily/ansible/deploy.yml
Normal file
21
xubuntuDaily/ansible/deploy.yml
Normal 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
|
||||
Reference in New Issue
Block a user