File tree Expand file tree Collapse file tree 9 files changed +51
-5
lines changed Expand file tree Collapse file tree 9 files changed +51
-5
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ matrix:
1313 fast_finish : true
1414env :
1515- LXC_DISTRO=debian LXC_RELEASE=jessie
16+ - LXC_DISTRO=debian LXC_RELEASE=stretch
1617- LXC_DISTRO=ubuntu LXC_RELEASE=xenial
1718- LXC_DISTRO=centos LXC_RELEASE=7
1819before_cache :
@@ -27,7 +28,7 @@ install:
2728- sudo apt-get install -y expect-dev
2829- pip install ansible
2930- ansible --version
30- - printf '[defaults]\nroles_path=../\ncallback_whitelist=profile_tasks' >ansible.cfg
31+ - printf '[defaults]\nroles_path=../\ncallback_whitelist=profile_tasks\nforks=10\npipelining=True ' >ansible.cfg
3132- ansible-galaxy install lae.travis-lxc
3233- ansible-playbook -vvv tests/install.yml -i tests/inventory
3334script :
Original file line number Diff line number Diff line change 11---
22# defaults file for lae.netbox
33netbox_stable : false
4- netbox_stable_version : 2.1.3
4+ netbox_stable_version : 2.1.4
55netbox_stable_uri : " https://github.com/digitalocean/netbox/archive/v{{ netbox_stable_version }}.tar.gz"
66
77netbox_git : false
@@ -28,6 +28,7 @@ netbox_config:
2828 - 127.0.0.1
2929 # NAPALM_USERNAME:
3030 # NAPALM_PASSWORD:
31+ MEDIA_ROOT : " {{ netbox_shared_path }}/media"
3132
3233netbox_user : netbox
3334netbox_group : netbox
Original file line number Diff line number Diff line change 6363 notify :
6464 - reload netbox.service
6565
66- - name : Set MEDIA_ROOT to shared media directory
66+ - name : Set MEDIA_ROOT to shared media directory (will be deprecated - if this is not skipped please update your NetBox)
6767 lineinfile :
6868 path : " {{ netbox_config_path }}/settings.py"
6969 regexp : ' ^MEDIA_ROOT\s*='
7070 line : ' MEDIA_ROOT = "{{ netbox_shared_path }}/media/"'
7171 state : present
7272 notify :
7373 - reload netbox.service
74+ when :
75+ - (netbox_stable and netbox_stable_version | version_compare('2.1.4', '<')) or (netbox_git and __netbox_git_contains_media_root_change.rc == 1)
7476
7577- name : Run database migrations for NetBox
7678 django_manage :
Original file line number Diff line number Diff line change 1111 path : " {{ netbox_git_deploy_path }}"
1212 state : directory
1313
14+ - name : Check existence of commit 643f64d, affecting MEDIA_ROOT
15+ shell : ' git log --format=%H "{{ netbox_git_version }}" | grep ^643f64df3f02912957c2faf1a7555876fe00e2bc'
16+ args :
17+ chdir : " {{ netbox_git_repo_path }}"
18+ register : __netbox_git_contains_media_root_change
19+ changed_when : False
20+ failed_when : " __netbox_git_contains_media_root_change.rc not in [0, 1]"
21+
22+ - name : Ensure MEDIA_ROOT is defined if commit 643f64d exists
23+ fail :
24+ msg : " Please define MEDIA_ROOT in netbox_config."
25+ when :
26+ - __netbox_git_contains_media_root_change.rc == 0 and "MEDIA_ROOT" not in netbox_config
27+
1428- name : Archive and extract snapshot of git repository
1529 shell : ' git archive "{{ netbox_git_version }}" | tar -x -C "{{ netbox_git_deploy_path }}"'
1630 args :
Original file line number Diff line number Diff line change 3636 msg : " Please define NAPALM_USERNAME and NAPALM_PASSWORD in netbox_config to use NAPALM."
3737 when :
3838 - netbox_napalm_enabled and ("NAPALM_USERNAME" not in netbox_config or "NAPALM_PASSWORD" not in netbox_config)
39+
40+ - name : Ensure MEDIA_ROOT is defined
41+ fail :
42+ msg : " Please define MEDIA_ROOT in netbox_config."
43+ when :
44+ - netbox_stable and netbox_stable_version | version_compare('2.1.4', '<') and "MEDIA_ROOT" not in netbox_config
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ netbox_socket: "0.0.0.0:8080"
44netbox_config:
55 ALLOWED_HOSTS:
66 - "{{ inventory_hostname }}"
7+ MEDIA_ROOT: "{{ netbox_shared_path }}/media"
78netbox_superuser_password: netbox
89netbox_database: "netbox_{{ inventory_hostname_short }}"
910netbox_database_host: 10.0.3.1
Original file line number Diff line number Diff line change @@ -21,4 +21,3 @@ netbox_pip3_binary: /usr/bin/pip3
2121netbox_ldap_packages :
2222 - libldap2-dev
2323 - libsasl2-dev
24- - libssl-dev
Original file line number Diff line number Diff line change 1+ ---
2+ netbox_packages :
3+ - libxml2-dev
4+ - libxslt1-dev
5+ - libffi-dev
6+ - graphviz
7+ - libpq-dev
8+ - libssl-dev
9+ netbox_python2_packages :
10+ - python2.7
11+ - python-dev
12+ - python-pip
13+ netbox_python2_binary : /usr/bin/python2.7
14+ netbox_pip2_binary : /usr/bin/pip2
15+ netbox_python3_packages :
16+ - python3.5
17+ - python3.5-dev
18+ - python3-pip
19+ netbox_python3_binary : /usr/bin/python3.5
20+ netbox_pip3_binary : /usr/bin/pip3
21+ netbox_ldap_packages :
22+ - libldap2-dev
23+ - libsasl2-dev
Original file line number Diff line number Diff line change @@ -21,4 +21,3 @@ netbox_pip3_binary: /usr/bin/pip3
2121netbox_ldap_packages :
2222 - libldap2-dev
2323 - libsasl2-dev
24- - libssl-dev
You can’t perform that action at this time.
0 commit comments