Initial commit

This commit is contained in:
Julian Rother 2025-01-09 23:44:03 +01:00
commit 279b26964a
Signed by: julian
GPG key ID: C19B924C0CD13341
5 changed files with 68 additions and 0 deletions

44
tasks/main.yml Normal file
View file

@ -0,0 +1,44 @@
- name: Create netbox group
ansible.builtin.group:
name: netbox
system: true
- name: Create netbox user
ansible.builtin.user:
name: netbox
group: netbox
groups:
- redis
home: /var/lib/netbox
create_home: false # Created by postinst
system: true
- name: Create netbox config dir
ansible.builtin.file:
path: /etc/netbox
owner: root
group: netbox
mode: 0750
state: directory
- name: Create netbox config
ansible.builtin.template:
src: configuration.py.j2
dest: /etc/netbox/configuration.py
owner: root
group: netbox
mode: '0640'
notify:
- reconfigure netbox
- name: Create gunicorn config
ansible.builtin.template:
src: gunicorn.conf.py.j2
dest: /etc/netbox/gunicorn.conf.py
owner: root
group: netbox
mode: '0640'
notify:
- reconfigure netbox
# TODO: Build, fetch and install the deb (currently borrowed from KuKo and manually installed)