Initial commit
This commit is contained in:
commit
a27071c06a
16 changed files with 275 additions and 0 deletions
22
playbooks/base-upgrade.yml
Normal file
22
playbooks/base-upgrade.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
- hosts: debian
|
||||
become: true
|
||||
tasks:
|
||||
- name: Upgrade base system
|
||||
apt: upgrade=yes update_cache=yes
|
||||
notify: restart server
|
||||
# - name: Waiting for server to become available
|
||||
# wait_for:
|
||||
# port: 22
|
||||
# host: "{{ (ansible_ssh_host|default(ansible_host))|default(inventory_hostname) }}"
|
||||
# search_regex: OpenSSH
|
||||
# delay: 10
|
||||
# timeout: 60
|
||||
# connection: local
|
||||
# handlers:
|
||||
# - name: restart server
|
||||
# become: true
|
||||
# become_user: root
|
||||
# reboot:
|
||||
|
||||
# See also: https://www.middlewareinventory.com/blog/ansible_wait_for_reboot_to_complete/
|
||||
21
playbooks/bootstrap-python.yml
Normal file
21
playbooks/bootstrap-python.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
- hosts:
|
||||
- ubuntu
|
||||
- debian
|
||||
gather_facts: false
|
||||
become: true
|
||||
pre_tasks:
|
||||
- name: Print env
|
||||
raw: env
|
||||
- name: Generate locals
|
||||
raw: |
|
||||
export LC_ALL="de_DE.UTF-8";
|
||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin;
|
||||
locale-gen de_DE.UTF-8
|
||||
changed_when: false
|
||||
- name: Install Python
|
||||
raw: |
|
||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin;
|
||||
test -e /usr/bin/python || (apt -y update && apt -y install python python-apt)
|
||||
changed_when: false
|
||||
- setup: # gather facts
|
||||
39
playbooks/nsupdate.yml
Normal file
39
playbooks/nsupdate.yml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
tasks:
|
||||
- name: Add subdomains as CNAMEs to hh01.jotbe.io
|
||||
nsupdate:
|
||||
key_name: "{{ nsupdate_key_name }}"
|
||||
key_algorithm: "{{ nsupdate_key_algorithm }}"
|
||||
key_secret: "{{ nsupdate_private_key }}"
|
||||
server: "{{ nsupdate_dns_server_name }}"
|
||||
zone: hh01.jotbe.io
|
||||
record: "{{ item }}"
|
||||
type: CNAME
|
||||
ttl: 600
|
||||
value: hh01.jotbe.io.
|
||||
with_items:
|
||||
- cloud
|
||||
- hl
|
||||
- nextcloud
|
||||
- gitea
|
||||
- trilium
|
||||
- drone
|
||||
- name: Remove subdomain CNAMEs from hh01.jotbe.io
|
||||
nsupdate:
|
||||
key_name: "{{ nsupdate_key_name }}"
|
||||
key_algorithm: "{{ nsupdate_key_algorithm }}"
|
||||
key_secret: "{{ nsupdate_private_key }}"
|
||||
server: "{{ nsupdate_dns_server_name }}"
|
||||
zone: hh01.jotbe.io
|
||||
record: "{{ item }}"
|
||||
type: CNAME
|
||||
ttl: 600
|
||||
value: hh01.jotbe.io.
|
||||
state: absent
|
||||
with_items:
|
||||
- notes
|
||||
- plex
|
||||
- emby
|
||||
- jellyfin
|
||||
Loading…
Add table
Add a link
Reference in a new issue