Merge branch 'main' into ldap-van-revspace
This commit is contained in:
commit
788bf25edd
23 changed files with 68 additions and 82 deletions
|
@ -71,3 +71,7 @@
|
||||||
- { role: "acme", tags: [ "acme" ] }
|
- { role: "acme", tags: [ "acme" ] }
|
||||||
- { role: "nginx", tags: [ "nginx" ] }
|
- { role: "nginx", tags: [ "nginx" ] }
|
||||||
- { role: "chat", tags: [ "chat" ] }
|
- { role: "chat", tags: [ "chat" ] }
|
||||||
|
|
||||||
|
- hosts: ldap
|
||||||
|
roles:
|
||||||
|
- { role: "common", tags: [ "common" ] }
|
||||||
|
|
|
@ -6,4 +6,5 @@
|
||||||
- { role: "nft", tags: [ "nft" ] }
|
- { role: "nft", tags: [ "nft" ] }
|
||||||
- { role: "nginx", tags: [ "nginx" ] }
|
- { role: "nginx", tags: [ "nginx" ] }
|
||||||
- { role: "acme", tags: [ "acme" ] }
|
- { role: "acme", tags: [ "acme" ] }
|
||||||
|
- { role: "nodesource", tags: [ "nodesource" ] }
|
||||||
- { role: "chat", tags: [ "chat" ] }
|
- { role: "chat", tags: [ "chat" ] }
|
||||||
|
|
|
@ -50,6 +50,9 @@ homeassistant.bitlair.nl
|
||||||
[chat]
|
[chat]
|
||||||
chat.bitlair.nl
|
chat.bitlair.nl
|
||||||
|
|
||||||
|
[ldap]
|
||||||
|
ldap-new.bitlair.nl
|
||||||
|
|
||||||
[debian:children]
|
[debian:children]
|
||||||
bank
|
bank
|
||||||
fotos
|
fotos
|
||||||
|
|
1
pad.yaml
1
pad.yaml
|
@ -9,4 +9,5 @@
|
||||||
- { role: "nft", tags: [ "nft" ] }
|
- { role: "nft", tags: [ "nft" ] }
|
||||||
- { role: "acme", tags: [ "acme" ] }
|
- { role: "acme", tags: [ "acme" ] }
|
||||||
- { role: "nginx", tags: [ "nginx" ] }
|
- { role: "nginx", tags: [ "nginx" ] }
|
||||||
|
- { role: "nodesource", tags: [ "nodesource" ] }
|
||||||
- { role: "etherpad", tags: [ "etherpad" ] }
|
- { role: "etherpad", tags: [ "etherpad" ] }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
SHELL=/bin/bash
|
SHELL=/bin/bash
|
||||||
|
|
||||||
#m h dom mon dow user command
|
#m h dom mon dow user command
|
||||||
0 * * * * {{ bank_user }} (cd /home/{{ bank_user }}/data.git && git pull -r && git push && git gc --auto && cp revbank.products ../revbank.products)
|
*/10 * * * * {{ bank_user }} (cd /home/{{ bank_user }}/data.git && git pull -r && git push && git gc --auto && cp revbank.products ../revbank.products)
|
||||||
|
|
|
@ -4,17 +4,8 @@
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
state: present
|
state: present
|
||||||
pkg:
|
pkg:
|
||||||
- gpg
|
|
||||||
- apt-transport-https
|
|
||||||
- build-essential
|
- build-essential
|
||||||
|
- nodejs
|
||||||
- name: Import nodesource signing key
|
|
||||||
ansible.builtin.shell:
|
|
||||||
cmd: curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor
|
|
||||||
-o /usr/share/keyrings/nodesource.gpg
|
|
||||||
args:
|
|
||||||
creates: /usr/share/keyrings/nodesource.gpg
|
|
||||||
notify: Apt update
|
|
||||||
|
|
||||||
- name: Ensure directories are present
|
- name: Ensure directories are present
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -30,26 +21,15 @@
|
||||||
notify:
|
notify:
|
||||||
- Restart thelounge
|
- Restart thelounge
|
||||||
|
|
||||||
- name: Configure templates
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: "{{ item.src }}"
|
|
||||||
dest: "{{ item.dest }}"
|
|
||||||
owner: "{{ item.owner | default( chat_user ) }}"
|
|
||||||
group: "{{ item.group | default( chat_group ) }}"
|
|
||||||
mode: "{{ item.mode | default('0640') }}"
|
|
||||||
with_items:
|
|
||||||
- { src: "nodesource.list", dest: "/etc/apt/sources.list.d/nodesource.list", owner: root, group: root }
|
|
||||||
- { src: "nodejs-apt-pref", dest: "/etc/apt/preferences.d/nodejs", owner: root, group: root }
|
|
||||||
|
|
||||||
- name: Install nodejs
|
- name: Install nodejs
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: nodejs
|
|
||||||
|
|
||||||
- name: Install yarn
|
- name: Install yarn
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: npm install --global yarn
|
cmd: npm install --global yarn
|
||||||
|
|
||||||
- stat: path=/opt/thelounge
|
- ansible.builtin.stat:
|
||||||
|
path: /opt/thelounge
|
||||||
register: src_path
|
register: src_path
|
||||||
|
|
||||||
- name: Retreive thelounge source
|
- name: Retreive thelounge source
|
||||||
|
@ -88,14 +68,14 @@
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Ensure JS and JSON syntax checking packages are installed
|
- name: Ensure JS and JSON syntax checking packages are installed
|
||||||
yarn:
|
community.general.yarn:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
global: yes
|
global: yes
|
||||||
state: latest # FIXME: Remove when https://github.com/ansible/ansible/pull/39557 makes it in
|
# state: latest # FIXME: Remove when https://github.com/ansible/ansible/pull/39557 makes it in
|
||||||
with_items:
|
with_items:
|
||||||
- esprima
|
- esprima
|
||||||
- jsonlint
|
- jsonlint
|
||||||
changed_when: no # FIXME: Remove when https://github.com/ansible/ansible/pull/39557 makes it in
|
# changed_when: no # FIXME: Remove when https://github.com/ansible/ansible/pull/39557 makes it in
|
||||||
|
|
||||||
- name: Configure templates
|
- name: Configure templates
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
public: false,
|
public: false,
|
||||||
port: 9000,
|
port: 9000,
|
||||||
bind: "127.0.0.1",
|
bind: "0.0.0.0",
|
||||||
|
host: "127.0.0.1",
|
||||||
reverseProxy: true,
|
reverseProxy: true,
|
||||||
lockNetwork: true,
|
lockNetwork: true,
|
||||||
maxHistory: 10000,
|
maxHistory: 10000,
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
# {{ ansible_managed }}
|
|
||||||
|
|
||||||
Package: nodejs
|
|
||||||
Pin: origin deb.nodesource.com
|
|
||||||
Pin-Priority: 1000
|
|
|
@ -1,3 +0,0 @@
|
||||||
# {{ ansible_managed }}
|
|
||||||
|
|
||||||
deb [arch=amd64 signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_{{ nodejs_version }} nodistro main
|
|
|
@ -1,4 +1,3 @@
|
||||||
nodejs_version: 22.x
|
|
||||||
etherpad_db_user: etherpad
|
etherpad_db_user: etherpad
|
||||||
etherpad_db_password: "{{ lookup('password', '/tmp/etherpad_db_password length=32') }}"
|
etherpad_db_password: "{{ lookup('password', '/tmp/etherpad_db_password length=32') }}"
|
||||||
etherpad_db_name: etherpad
|
etherpad_db_name: etherpad
|
||||||
|
|
|
@ -3,43 +3,10 @@
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
state: present
|
state: present
|
||||||
pkg:
|
pkg:
|
||||||
- gpg
|
- nodejs
|
||||||
- postgresql
|
- postgresql
|
||||||
- python3-psycopg2
|
- python3-psycopg2
|
||||||
- apt-transport-https
|
|
||||||
|
|
||||||
- name: Import nodesource signing key
|
|
||||||
ansible.builtin.shell:
|
|
||||||
cmd: curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor
|
|
||||||
-o /usr/share/keyrings/nodesource.gpg
|
|
||||||
args:
|
|
||||||
creates: /usr/share/keyrings/nodesource.gpg
|
|
||||||
notify: apt update
|
|
||||||
|
|
||||||
- name: Install nodesource source list
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: nodesource.list
|
|
||||||
dest: /etc/apt/sources.list.d/nodesource.list
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0644
|
|
||||||
notify: apt update
|
|
||||||
|
|
||||||
- name: Install nodejs apt preference
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: nodejs-apt-pref
|
|
||||||
dest: /etc/apt/preferences.d/nodejs
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
mode: 0644
|
|
||||||
notify: apt update
|
|
||||||
|
|
||||||
- ansible.builtin.meta: flush_handlers
|
|
||||||
|
|
||||||
- name: Install nodejs
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name: nodejs
|
|
||||||
|
|
||||||
- name: Add database user
|
- name: Add database user
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
#m h dom mon dow user command
|
#m h dom mon dow user command
|
||||||
0 2 * * 1 {{ git_server_user }} {{ git_server_working_dir }}/update.sh
|
0 2 * * 1 root {{ git_server_working_dir }}/update.sh
|
||||||
|
|
2
roles/nodesource/defaults/main.yaml
Normal file
2
roles/nodesource/defaults/main.yaml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
---
|
||||||
|
nodesource_version: 22.x
|
3
roles/nodesource/handlers/main.yaml
Normal file
3
roles/nodesource/handlers/main.yaml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
- ansible.builtin.import_tasks:
|
||||||
|
file: ../../common/handlers/main.yaml
|
33
roles/nodesource/tasks/main.yaml
Normal file
33
roles/nodesource/tasks/main.yaml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
---
|
||||||
|
- name: Install dependencies
|
||||||
|
ansible.builtin.apt:
|
||||||
|
state: present
|
||||||
|
pkg:
|
||||||
|
- apt-transport-https
|
||||||
|
- gpg
|
||||||
|
|
||||||
|
- name: Import nodesource signing key
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: |
|
||||||
|
set -o pipefail
|
||||||
|
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg
|
||||||
|
executable: /bin/bash
|
||||||
|
args:
|
||||||
|
creates: /usr/share/keyrings/nodesource.gpg
|
||||||
|
notify: apt update
|
||||||
|
|
||||||
|
- name: Install nodesource apt files
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: nodesource.list
|
||||||
|
dest: /etc/apt/sources.list.d/nodesource.list
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
notify: apt update
|
||||||
|
with_items:
|
||||||
|
- src: nodesource.list
|
||||||
|
dest: /etc/apt/sources.list.d/nodesource.list
|
||||||
|
- src: nodejs-apt-pref
|
||||||
|
dest: /etc/apt/preferences.d/nodejs
|
||||||
|
|
||||||
|
- ansible.builtin.meta: flush_handlers
|
|
@ -1,3 +1,3 @@
|
||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_{{ nodejs_version }} nodistro main
|
deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_{{ nodesource_version }} nodistro main
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
- name: Clone source
|
- name: Clone source
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: https://github.com/bitlair/discord-bot.git
|
repo: https://git.bitlair.nl/bitlair/discord-bot.git
|
||||||
version: main
|
version: main
|
||||||
dest: /var/lib/discord-bot
|
dest: /var/lib/discord-bot
|
||||||
accept_hostkey: yes
|
accept_hostkey: yes
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
- name: Clone source
|
- name: Clone source
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: https://github.com/bitlair/mastodon-spacestate.git
|
repo: https://git.bitlair.nl/bitlair/mastodon-spacestate.git
|
||||||
version: main
|
version: main
|
||||||
dest: /var/lib/mastodon-spacestate
|
dest: /var/lib/mastodon-spacestate
|
||||||
accept_hostkey: yes
|
accept_hostkey: yes
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
- name: Clone source
|
- name: Clone source
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: https://github.com/bitlair/spacestated.git
|
repo: https://git.bitlair.nl/bitlair/spacestated.git
|
||||||
version: main
|
version: main
|
||||||
dest: /var/lib/spacestated/spacestated
|
dest: /var/lib/spacestated/spacestated
|
||||||
accept_hostkey: yes
|
accept_hostkey: yes
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
- name: Clone source
|
- name: Clone source
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: https://github.com/bitlair/wifi-mqtt.git
|
repo: https://git.bitlair.nl/bitlair/wifi-mqtt.git
|
||||||
version: main
|
version: main
|
||||||
dest: /var/lib/wifi-mqtt
|
dest: /var/lib/wifi-mqtt
|
||||||
accept_hostkey: yes
|
accept_hostkey: yes
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
- name: Clone source
|
- name: Clone source
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: https://github.com/bitlair/calendar-parser.git
|
repo: https://git.bitlair.nl/bitlair/wiki-calendar-exporter.git
|
||||||
version: main
|
version: main
|
||||||
dest: /usr/local/src/bitlair-calendar
|
dest: /usr/local/src/bitlair-calendar
|
||||||
accept_hostkey: yes
|
accept_hostkey: yes
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
- name: Clone spaceapi source
|
- name: Clone spaceapi source
|
||||||
ansible.builtin.git:
|
ansible.builtin.git:
|
||||||
repo: https://github.com/bitlair/spaceapi.git
|
repo: https://git.bitlair.nl/bitlair/spaceapi.git
|
||||||
version: main
|
version: main
|
||||||
dest: /opt/spaceapi
|
dest: /opt/spaceapi
|
||||||
accept_hostkey: true
|
accept_hostkey: true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue