2018-09-21 15:59:10 +02:00
|
|
|
---
|
|
|
|
- name: clone repo
|
|
|
|
git:
|
|
|
|
repo: "https://github.com/sileht/bird-lg.git"
|
|
|
|
dest: "{{ lg_path }}"
|
|
|
|
version: master
|
|
|
|
force: yes
|
2018-09-25 16:41:43 +02:00
|
|
|
become: false
|
2018-09-21 15:59:10 +02:00
|
|
|
|
|
|
|
- name: install dependencies
|
|
|
|
package:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
loop:
|
|
|
|
- python-flask
|
|
|
|
- python-dnspython
|
|
|
|
- python-pydot
|
|
|
|
- python-memcache
|
|
|
|
- graphviz
|
|
|
|
- whois
|
|
|
|
- traceroute
|
|
|
|
|
|
|
|
- name: create system user
|
|
|
|
user:
|
|
|
|
name: "{{ lg_user }}"
|
|
|
|
home: "{{ lg_path }}"
|
|
|
|
groups: bird
|
|
|
|
shell: /bin/false
|
|
|
|
|
|
|
|
- name: create log dir
|
|
|
|
file:
|
|
|
|
path: "/var/log/bird-lg"
|
|
|
|
state: directory
|
|
|
|
owner: "{{ lg_user }}"
|
|
|
|
group: "{{ lg_user }}"
|
|
|
|
|
|
|
|
- name: configure lg-proxy
|
2019-03-02 18:10:48 +01:00
|
|
|
when: server_type == "gateway"
|
2018-09-21 15:59:10 +02:00
|
|
|
include_tasks: lg-proxy.yml
|
|
|
|
|
|
|
|
- name: configure lg-webservice
|
2019-03-02 18:10:48 +01:00
|
|
|
when: server_type == "monitoring"
|
2018-09-21 15:59:10 +02:00
|
|
|
include_tasks: lg-webservice.yml
|