initial commit
This commit is contained in:
4
ansible.cfg
Normal file
4
ansible.cfg
Normal file
@@ -0,0 +1,4 @@
|
||||
[defaults]
|
||||
inventory = hosts
|
||||
log_path = /var/log/ansible.log
|
||||
retry_files_enabled = False
|
||||
1
files/sudoers_ansible
Normal file
1
files/sudoers_ansible
Normal file
@@ -0,0 +1 @@
|
||||
ansible ALL=NOPASSWD:/usr/bin/ansible-pull
|
||||
56
host_vars/TUXEDO-Book-XP1511.universe.local.yml
Normal file
56
host_vars/TUXEDO-Book-XP1511.universe.local.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
ssh_port: 22
|
||||
ssh_users: rene
|
||||
|
||||
#application selection
|
||||
autofs: false
|
||||
borgbackup: true
|
||||
brave: true
|
||||
broot: true
|
||||
chromium: true
|
||||
docker: false
|
||||
firefox: true
|
||||
games: true
|
||||
gimp: false
|
||||
google_chrome: false
|
||||
joplin: true
|
||||
keepass: true
|
||||
keepassxc: true
|
||||
libreoffice: true
|
||||
midnightcommander: true
|
||||
nextcloud_client: true
|
||||
nvidia: false
|
||||
pacaur: true
|
||||
ranger: true
|
||||
syncthing: true
|
||||
thunderbird: true
|
||||
vifm: true
|
||||
virtualbox: false
|
||||
vivaldi: false
|
||||
yay: false
|
||||
yubikey: true
|
||||
|
||||
#purpose selection
|
||||
database: false
|
||||
development: true
|
||||
dhcpserver: false
|
||||
fileserver: false
|
||||
mailserver: false
|
||||
mobile: true
|
||||
nameserver: false
|
||||
photo_editing: true
|
||||
printspooler: false
|
||||
proxyserver: false
|
||||
video_editing: true
|
||||
webserver: false
|
||||
|
||||
#shell selection
|
||||
zsh: true
|
||||
|
||||
#desktop environment selection
|
||||
cinnamon: false
|
||||
deepin: false
|
||||
gnome: false
|
||||
kde: true
|
||||
mate: false
|
||||
xfce: false
|
||||
36
host_vars/coruscant.universe.local.yml
Normal file
36
host_vars/coruscant.universe.local.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
branch: master
|
||||
|
||||
ansible_cron_minute: "*/5"
|
||||
|
||||
ssh_port: 22
|
||||
ssh_users: "root rene"
|
||||
|
||||
# platform-specific
|
||||
microcode_amd_install: false
|
||||
microcode_intel_install: true
|
||||
|
||||
#purpose selection
|
||||
database: true
|
||||
dhcpserver: true
|
||||
fileserver: true
|
||||
mailserver: true
|
||||
nameserver: true
|
||||
printspooler: true
|
||||
proxyserver: true
|
||||
webserver: true
|
||||
|
||||
#application selection
|
||||
borgbackup: true
|
||||
broot: true
|
||||
docker: false
|
||||
pacaur: true
|
||||
paru: true
|
||||
ranger: true
|
||||
syncthing: true
|
||||
vifm: true
|
||||
yay: false
|
||||
|
||||
#shell selection
|
||||
zsh: true
|
||||
|
||||
56
host_vars/endor.universe.local.yml
Normal file
56
host_vars/endor.universe.local.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
ssh_port: 22
|
||||
ssh_users: rene
|
||||
|
||||
#application selection
|
||||
autofs: false
|
||||
borgbackup: true
|
||||
brave: true
|
||||
broot: true
|
||||
chromium: true
|
||||
docker: false
|
||||
firefox: true
|
||||
games: true
|
||||
gimp: false
|
||||
google_chrome: false
|
||||
joplin: true
|
||||
keepass: true
|
||||
keepassxc: true
|
||||
libreoffice: true
|
||||
midnightcommander: true
|
||||
nextcloud_client: true
|
||||
nvidia: true
|
||||
pacaur: true
|
||||
ranger: true
|
||||
syncthing: true
|
||||
thunderbird: true
|
||||
vifm: true
|
||||
virtualbox: true
|
||||
vivaldi: false
|
||||
yay: false
|
||||
yubikey: true
|
||||
|
||||
#purpose selection
|
||||
database: false
|
||||
development: true
|
||||
dhcpserver: false
|
||||
fileserver: false
|
||||
mailserver: false
|
||||
mobile: false
|
||||
nameserver: false
|
||||
photo_editing: true
|
||||
printspooler: false
|
||||
proxyserver: false
|
||||
video_editing: true
|
||||
webserver: false
|
||||
|
||||
#shell selection
|
||||
zsh: true
|
||||
|
||||
#desktop environment selection
|
||||
cinnamon: false
|
||||
deepin: false
|
||||
gnome: false
|
||||
kde: true
|
||||
mate: false
|
||||
xfce: false
|
||||
64
host_vars/endorvm.universe.local.yml
Normal file
64
host_vars/endorvm.universe.local.yml
Normal file
@@ -0,0 +1,64 @@
|
||||
---
|
||||
branch: master
|
||||
|
||||
ansible_cron_minute: "*/5"
|
||||
|
||||
ssh_port: 22
|
||||
ssh_users: "root rene"
|
||||
|
||||
# platform-specific
|
||||
microcode_amd_install: false
|
||||
microcode_intel_install: true
|
||||
|
||||
#application selection
|
||||
autofs: false
|
||||
borgbackup: true
|
||||
brave: true
|
||||
broot: true
|
||||
chromium: true
|
||||
docker: false
|
||||
firefox: true
|
||||
games: true
|
||||
gimp: false
|
||||
google_chrome: false
|
||||
joplin: true
|
||||
keepass: true
|
||||
keepassxc: true
|
||||
libreoffice: true
|
||||
midnightcommander: true
|
||||
nextcloud_client: true
|
||||
nvidia: true
|
||||
pacaur: true
|
||||
ranger: true
|
||||
syncthing: true
|
||||
thunderbird: true
|
||||
vifm: true
|
||||
virtualbox: true
|
||||
vivaldi: false
|
||||
yay: false
|
||||
yubikey: true
|
||||
|
||||
#purpose selection
|
||||
database: false
|
||||
development: true
|
||||
dhcpserver: false
|
||||
fileserver: false
|
||||
mailserver: false
|
||||
mobile: false
|
||||
nameserver: false
|
||||
photo_editing: true
|
||||
printspooler: false
|
||||
proxyserver: false
|
||||
video_editing: true
|
||||
webserver: false
|
||||
|
||||
#shell selection
|
||||
zsh: true
|
||||
|
||||
#desktop environment selection
|
||||
cinnamon: false
|
||||
deepin: false
|
||||
gnome: false
|
||||
kde: true
|
||||
mate: false
|
||||
xfce: false
|
||||
17
host_vars/mewimeet.de.yml
Normal file
17
host_vars/mewimeet.de.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
branch: master
|
||||
|
||||
ansible_cron_minute: "40"
|
||||
ssh_port: 22
|
||||
ssh_users: "user1 user2"
|
||||
|
||||
# platform-specific
|
||||
linode_instance: true
|
||||
microcode_amd_install: false
|
||||
microcode_intel_install: false
|
||||
proxmox_instance: false
|
||||
raspberry_pi: false
|
||||
|
||||
# server
|
||||
unattended_upgrades: true
|
||||
web_server: true
|
||||
17
host_vars/mewitoot.de.yml
Normal file
17
host_vars/mewitoot.de.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
branch: master
|
||||
|
||||
ansible_cron_minute: "40"
|
||||
ssh_port: 22
|
||||
ssh_users: "user1 user2"
|
||||
|
||||
# platform-specific
|
||||
linode_instance: true
|
||||
microcode_amd_install: false
|
||||
microcode_intel_install: false
|
||||
proxmox_instance: false
|
||||
raspberry_pi: false
|
||||
|
||||
# server
|
||||
unattended_upgrades: true
|
||||
web_server: true
|
||||
9
hosts
Normal file
9
hosts
Normal file
@@ -0,0 +1,9 @@
|
||||
[workstation]
|
||||
endor.universe.local
|
||||
endorvm.universe.local
|
||||
tuxedo-book-xp1511.universe.local
|
||||
|
||||
[server]
|
||||
coruscant.universe.local
|
||||
mewimeet.de
|
||||
mewitoot.de
|
||||
77
local.yml
Normal file
77
local.yml
Normal file
@@ -0,0 +1,77 @@
|
||||
---
|
||||
- hosts: all
|
||||
connection: local
|
||||
become: true
|
||||
|
||||
pre_tasks:
|
||||
- name: pre-run | update apt repository (debian, ubuntu, etc.)
|
||||
apt: update_cache=yes
|
||||
changed_when: False
|
||||
when: ansible_distribution in ["Debian", "Ubuntu"]
|
||||
- name: pre-run | update pacman repository (arch)
|
||||
pacman: update_cache=yes
|
||||
changed_when: False
|
||||
when: ansible_distribution == 'Archlinux'
|
||||
- name: pre-run |update portage repository (gentoo)
|
||||
portage:
|
||||
sync: yes
|
||||
when: ansible_distribution == 'Gentoo'
|
||||
|
||||
# run roles
|
||||
- hosts: all
|
||||
tags: base
|
||||
become: true
|
||||
roles:
|
||||
- base
|
||||
|
||||
- hosts: workstation
|
||||
tags: workstation
|
||||
become: true
|
||||
roles:
|
||||
- workstation
|
||||
|
||||
- hosts: server
|
||||
tags: server
|
||||
become: true
|
||||
roles:
|
||||
- server
|
||||
|
||||
# end of roles; cleanup and reporting
|
||||
- hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
- name: cleanup package cache (debian and ubuntu)
|
||||
tags: always
|
||||
apt:
|
||||
autoclean: yes
|
||||
changed_when: false
|
||||
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu"]
|
||||
|
||||
- name: autoremove orphan packages (debian and ubuntu)
|
||||
tags: always
|
||||
apt:
|
||||
autoremove: yes
|
||||
purge: yes
|
||||
when: ansible_distribution in ["Debian", "Pop!_OS", "Ubuntu"]
|
||||
|
||||
- name: cleanup package cache (arch)
|
||||
tags: always
|
||||
pacman:
|
||||
autoclean: yes
|
||||
changed_when: false
|
||||
when: ansible_distribution == "Archlinux"
|
||||
|
||||
- name: send completion alert
|
||||
include_tasks: playbooks/send_completion_alert.yml
|
||||
tags: always
|
||||
when:
|
||||
- task_failed is not defined
|
||||
|
||||
- name: send failure alert
|
||||
include_tasks: playbooks/send_failure_alert.yml
|
||||
tags: always
|
||||
when:
|
||||
- task_failed is defined
|
||||
- task_failed == true
|
||||
|
||||
# vim: ts=2 sw=2 fdm=indent
|
||||
0
os_vars/arch.yml
Normal file
0
os_vars/arch.yml
Normal file
0
os_vars/centos.yml
Normal file
0
os_vars/centos.yml
Normal file
0
os_vars/debian.yml
Normal file
0
os_vars/debian.yml
Normal file
0
os_vars/fedore.yml
Normal file
0
os_vars/fedore.yml
Normal file
0
os_vars/gentoo.yml
Normal file
0
os_vars/gentoo.yml
Normal file
0
os_vars/leap.yml
Normal file
0
os_vars/leap.yml
Normal file
0
os_vars/opensuse.yml
Normal file
0
os_vars/opensuse.yml
Normal file
0
os_vars/redhat.yml
Normal file
0
os_vars/redhat.yml
Normal file
0
os_vars/ubuntu.yml
Normal file
0
os_vars/ubuntu.yml
Normal file
0
roles/database/main.yml
Normal file
0
roles/database/main.yml
Normal file
0
roles/development/main.yml
Normal file
0
roles/development/main.yml
Normal file
0
roles/dhcpserver/main.yml
Normal file
0
roles/dhcpserver/main.yml
Normal file
0
roles/fileserver/main.yml
Normal file
0
roles/fileserver/main.yml
Normal file
0
roles/mailserver/main.yml
Normal file
0
roles/mailserver/main.yml
Normal file
0
roles/mobile/main.yml
Normal file
0
roles/mobile/main.yml
Normal file
0
roles/nameserver/main.yml
Normal file
0
roles/nameserver/main.yml
Normal file
0
roles/photo_editing/main.yml
Normal file
0
roles/photo_editing/main.yml
Normal file
0
roles/printspooler/main.yml
Normal file
0
roles/printspooler/main.yml
Normal file
0
roles/proxyserver/main.yml
Normal file
0
roles/proxyserver/main.yml
Normal file
0
roles/video_editing/main.yml
Normal file
0
roles/video_editing/main.yml
Normal file
0
roles/webserver/main.yml
Normal file
0
roles/webserver/main.yml
Normal file
3
tasks/basetools/main.yml
Normal file
3
tasks/basetools/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: install basetools
|
||||
|
||||
0
tasks/cinnamon/main.yml
Normal file
0
tasks/cinnamon/main.yml
Normal file
0
tasks/deepin/main.yml
Normal file
0
tasks/deepin/main.yml
Normal file
0
tasks/gnome/main.yml
Normal file
0
tasks/gnome/main.yml
Normal file
0
tasks/kde/main.yml
Normal file
0
tasks/kde/main.yml
Normal file
0
tasks/mate/main.yml
Normal file
0
tasks/mate/main.yml
Normal file
8
tasks/users/main.yml
Normal file
8
tasks/users/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
- name: create ansible user
|
||||
user: name=ansible uid=900
|
||||
|
||||
- name: copy sudoers_ansible
|
||||
copy: src=files/sudoers_ansible dest=/etc/sudoers.d/ansible owner=root group=root mode=0440
|
||||
|
||||
- name: create daily user
|
||||
user: name=rene
|
||||
0
tasks/xfce/main.yml
Normal file
0
tasks/xfce/main.yml
Normal file
9
tasks/zsh/main.yml
Normal file
9
tasks/zsh/main.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
zsh
|
||||
zsh-autosuggestions
|
||||
zsh-completions
|
||||
zsh-doc
|
||||
zsh-history-substring-search
|
||||
zsh-lovers
|
||||
zsh-syntax-highlighting
|
||||
zsh-theme-powerlevel9k
|
||||
zshdb
|
||||
12
templates/wlan_auto_toggle.j2
Executable file
12
templates/wlan_auto_toggle.j2
Executable file
@@ -0,0 +1,12 @@
|
||||
#! /bin/sh
|
||||
|
||||
if [ "$1" = "{{ ansible_default_ipv4.interface }}" ]; then
|
||||
case "$2" in
|
||||
up)
|
||||
nmcli radio wifi off
|
||||
;;
|
||||
down)
|
||||
nmcli radio wifi on
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
Reference in New Issue
Block a user