servers/roles/netbox/tasks/main.yml

26 lines
575 B
YAML
Raw Normal View History

- name: Set variables
set_fact:
user: '{{ user | default("netbox") }}'
database: '{{ database | default("netbox") }}'
db_password: '{{ lookup("password", "/dev/null", chars=["ascii_letters", "digits"]) }}'
- name: Create group for web service
group:
name: '{{ user }}'
system: yes
- name: Create user for web service
user:
name: '{{ user }}'
group: '{{ user }}'
home: '/srv/{{ user }}'
shell: /bin/sh
system: yes
register: user_info
- name: Set up database
import_tasks: db.yml
- name: Set up app
import_tasks: app.yml