Initial commit
This commit is contained in:
commit
279b26964a
5 changed files with 68 additions and 0 deletions
44
tasks/main.yml
Normal file
44
tasks/main.yml
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue