Initial
This commit is contained in:
commit
47cd582d3a
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*.id_rsa
|
||||||
|
*.id_rsa*
|
||||||
9
README.md
Normal file
9
README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Ansible playbooks for the home network
|
||||||
|
|
||||||
|
Add hosts to inventory/production/hosts
|
||||||
|
|
||||||
|
Add testing hosts to inventory/testing/hosts
|
||||||
|
|
||||||
|
|
||||||
|
run with `ansible-playbook -i INVENTORYFILE run.yml`
|
||||||
|
|
||||||
10
inventories/testing/hosts
Normal file
10
inventories/testing/hosts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[servers]
|
||||||
|
proxmox ansible_host=10.6.9.46
|
||||||
|
docker ansible_host=10.6.9.199
|
||||||
|
gitea ansible_host=10.6.9.44
|
||||||
|
ipa ansible_host=10.6.9.23
|
||||||
|
seedy2 ansible_host=10.6.9.5
|
||||||
|
tailscale ansible_host=10.6.9.109
|
||||||
|
backups ansible_host=10.6.9.79
|
||||||
|
build ansible_host=10.6.9.103
|
||||||
|
ansible ansible_host=10.6.9.37
|
||||||
31
roles/benssanity/tasks/main.yml
Normal file
31
roles/benssanity/tasks/main.yml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
- name: Vim is installed and up to date (rhel)
|
||||||
|
yum:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: latest
|
||||||
|
loop:
|
||||||
|
- vim
|
||||||
|
- wget
|
||||||
|
- git
|
||||||
|
when: ansible_distribution == 'CentOS' or ansible_distribution == 'RedHat' or ansible_distribution == 'AlmaLinux'
|
||||||
|
|
||||||
|
- name: Vim is installed and up to date (debian)
|
||||||
|
apt:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
loop:
|
||||||
|
- vim
|
||||||
|
- wget
|
||||||
|
- git
|
||||||
|
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||||
|
|
||||||
|
- name: Vim is installed and up to date (arch)
|
||||||
|
community.general.pacman:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
loop:
|
||||||
|
- vim
|
||||||
|
- wget
|
||||||
|
- git
|
||||||
|
when: ansible_distribution == 'Archlinux'
|
||||||
10
roles/sync/files/authorized_keys
Normal file
10
roles/sync/files/authorized_keys
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Synced with ansible
|
||||||
|
|
||||||
|
# Ansible
|
||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCx0kTJhCe3MRBAM4BQoY/Hb7uoYJA0hwTkwJ0Nr80helmMKTT22h5bh5gFBmoq645e66J1vCsWN5vAwF3J0vHSxWkH3SxwIojolMviZwjOOF4+Ym7oMk7ejCoS58llGi9hcOEjXpvbYD4fxe2hO3uihfvRO3kBLfaVdJnhQRzXn/vfRoKxuITLRo3dI6aAqiv+piRnfcCG9ZgqKUchsA8Gp1ZB3n3YIDUhYDEqG6Wd/k5Xyv37bcfB/Xsl0+s5IY1pIMJAvX/dxJxH6sPjG06NOTwZWQSVlAJFBAzpQyFvtcOYVCKKXm7COMHqUHtjftzG//Dl8ZdRWlt6e9ZSn/Vc8t3VfunUCi7Fnk/mDDSXrHAohwfK/wmep7c//QP61DSecmLVB7CVQ5lC/3bcieYsSK8LO8nPkP+sFQ4QNEPoZBRD/tGJbM5p/9nv1WtP+u4haTivmXBPyKFQr4wDuFAxiEN63bHMejS27NEG4i2NzdQiAt0ZGCTtsiLJku4CJb8= ben@archibold.lovelynet.net
|
||||||
|
|
||||||
|
# Benjamyn Love
|
||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC7oqGBT6uwAUw5FsQKDd8hfZ340OY8w3iWZq7UAf/iiU4dZOy3azLxEAIQHZiRlV+T7OxzaRgceyJgDNBDmsgJTv8jTen2wFr0a/wnt6FcvfbZqojxkyuAtThStX+d65/T3ASmnZOlWbsBYnDQTRxrNRxXp850MK7C5mkre4gMxdG/FtEmCXJMIYACacAi5R+mP2gHmrmLgfN0saqprVz1A2/aYPmDQz/MGKuGkj8x0Qm/GcMkYwxNNCCdJq8EoqR+umIm6RYwCdvcWP2wj2ut4b5ZOVg1l4PWtvqNLs4whrtstau0SQalXwyCIfecy5wcArALKDFxpl220lwIhmBZBVWuS6uwSmmbFJyvYAy7279rjDUimM1Vj0c+tPYoIrM0kvn+0JApf1lNTO3qPPe0MuL1CjzaE64rZEChhh+sWQpBDCea9ouyXw+nB0JsF96wSd5u9dTfehLmIcjSoTnBeiRZO5HdWwrPeI5fMLjINhh42QsVK4d8Gys1cZbPSEE= ben@archibold.lovelynet.net
|
||||||
|
|
||||||
|
# Jordan Martin-Hall
|
||||||
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDSSjBLx4imVMgxhAo2za10/8HRE9ngjYF4vseVm9mwGFCUVbP3bCEq1dSSzPEuml239pFnMUNQqY857L+lh1KGbFp3x0iEzZa/+cbKQX1k4gGujdMEYXvyzW9vBptf11JdKASNuS7XOwSwlkAJiG+gW9gN5hvVldkHc/4uCZILvwVojtsBDfVbaB4BcNP694iGmmLbUgCfoMOXvR5+stFtfOaPR9I1yBdnW6Wmx/sX5fuNouq22s+X60HGOYrwDMDmq0uZV5riXkyAIa2LBdtaAiAj4FeCyL1GxRAhftPDTROxL8uYk+EIfVkdj+fZqBUBDALpK/Q92Qohhi+0XqT6ENuIdHZDeJrH5ebasDyLtpr+zJlVcxBIxJW+a8ub2NeaLZvlj4xkp/vvEKre9zrmxVMaFHGSmoi6QtBHR8GpwkVzJCiYVrMpzk6i/LW91mMwHXgje/oCu8g3DCCUIzpaBkMYn3qFHN6OR1IcaVD8qS4gg73ohn2UXM183LiwNms= jorraan@archbox.JMH
|
||||||
15
roles/sync/tasks/main.yml
Normal file
15
roles/sync/tasks/main.yml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
- name: verify that .ssh exists
|
||||||
|
file:
|
||||||
|
path: /root/.ssh
|
||||||
|
state: directory
|
||||||
|
mode: "0600"
|
||||||
|
tags:
|
||||||
|
- sync
|
||||||
|
|
||||||
|
- name: sync ssh authorized_keys
|
||||||
|
copy:
|
||||||
|
src: authorized_keys
|
||||||
|
dest: /root/.ssh/authorized_keys
|
||||||
|
tags:
|
||||||
|
- sync
|
||||||
22
roles/update/tasks/main.yml
Normal file
22
roles/update/tasks/main.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
- name: run updates (debian)
|
||||||
|
apt: upgrade=dist force_apt_get=yes
|
||||||
|
tags:
|
||||||
|
- debian
|
||||||
|
- update
|
||||||
|
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
||||||
|
|
||||||
|
- name: run updates (rhel)
|
||||||
|
yum:
|
||||||
|
name: '*'
|
||||||
|
state: latest
|
||||||
|
tags:
|
||||||
|
- rhel
|
||||||
|
- update
|
||||||
|
when: ansible_distribution == 'CentOS' or ansible_distribution == 'RedHat' or ansible_distribution == 'AlmaLinux'
|
||||||
|
|
||||||
|
- name: run updates (arch)
|
||||||
|
community.general.pacman:
|
||||||
|
update_cache: true
|
||||||
|
upgrade: true
|
||||||
|
when: ansible_distribution == 'Archlinux'
|
||||||
Loading…
x
Reference in New Issue
Block a user