File tree 2 files changed +22
-15
lines changed 2 files changed +22
-15
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 27
27
notify :
28
28
- reload netbox
29
29
30
- - include : configure_ldap.yml
31
- when : netbox_ldap_enabled
30
+ - block :
31
+ - name : Install django-auth-ldap if LDAP is enabled
32
+ pip :
33
+ name : django-auth-ldap
34
+ virtualenv : " {{ netbox_virtualenv_path }}"
35
+
36
+ - name : Generate LDAP configuration for NetBox if enabled
37
+ template :
38
+ src : " {{ netbox_ldap_config_template }}"
39
+ dest : " {{ netbox_shared_path }}/ldap_config.py"
40
+ mode : 0600
41
+ notify :
42
+ - reload netbox
43
+ when :
44
+ - netbox_ldap_enabled
32
45
33
46
- name : Symlink NetBox configuration file into the active NetBox release
34
47
file :
35
48
src : " {{ netbox_shared_path }}/configuration.py"
36
49
dest : " {{ netbox_config_path }}/configuration.py"
37
50
state : link
38
51
52
+ - name : Symlink/Remove NetBox LDAP configuration file into/from the active NetBox release
53
+ file :
54
+ src : " {{ netbox_shared_path }}/ldap_config.py"
55
+ dest : " {{ netbox_config_path }}/ldap_config.py"
56
+ force : yes
57
+ state : " {{ 'absent' if netbox_ldap_enabled else 'link' }}"
58
+
39
59
- name : Run database migrations for NetBox
40
60
django_manage :
41
61
command : migrate
You can’t perform that action at this time.
0 commit comments