You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
1.7 KiB
YAML

---
- name: Install system dependencies
apt:
name:
- python
- python-pip
- python-virtualenv
- whois
- traceroute
- graphviz
- name: Create group
group:
name: "{{ bird_lg_group }}"
state: present
- name: Create user
user:
name: "{{ bird_lg_user }}"
group: "{{ bird_lg_group }}"
create_home: no
system: yes
- name: Add user to group bird
user:
name: '{{ bird_lg_user }}'
groups: "bird"
append: yes
when: bird_lg_proxy_enabled
- name: Create installation Directory
file:
path: "{{ bird_lg_install_path }}"
recurse: yes
state: directory
owner: "{{ bird_lg_user }}"
group: "{{ bird_lg_group }}"
- name: Create log Directory
file:
path: "{{ bird_lg_log_path }}"
recurse: yes
state: directory
owner: "{{ bird_lg_user }}"
group: "{{ bird_lg_group }}"
- name: Clone bird_lg source
git:
dest: "{{ bird_lg_install_path }}"
repo: "{{ bird_lg_repository }}"
version: "{{ bird_lg_version }}"
force: yes
become_user: "{{ bird_lg_user }}"
become: true
- name: fix broken encoding due to change in memcached library
lineinfile:
path: "{{ bird_lg_install_path }}/lg.py"
regexp: 'return "AS\%s \| \%s" \% \(_as, name.*'
line: ' return "AS%s | %s" % (_as, name)'
- name: Install python-dependencies
pip:
name:
- flask
- dnspython
- pydot
- python-memcached
virtualenv: "{{ bird_lg_install_path }}/.venv"
state: present
become_user: "{{ bird_lg_user }}"
become: true
- include_tasks: proxy.yml
when: bird_lg_proxy_enabled
- include_tasks: web.yml
when: bird_lg_webservice_enabled