File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 133133 notify :
134134 - reload netbox.service
135135
136+ # local_settings.py
137+ - name : Copy NetBox local_settings.py into shared (ignore if it doesn't exist)
138+ copy :
139+ src : " {{ playbook_dir }}/files/netbox/local_settings.py"
140+ dest : " {{ netbox_shared_path }}/local_settings.py"
141+ owner : " {{ netbox_user }}"
142+ group : " {{ netbox_group }}"
143+ ignore_errors : yes
144+
145+ - name : Check if local_settings.py file exists in shared
146+ stat :
147+ path : " {{ netbox_shared_path }}/local_settings.py"
148+ register : netbox_local_settings_file_in_shared
149+
150+ - name : Symlink/Remove NetBox local_settings.py file into/from the active NetBox release
151+ file :
152+ src : " {{ netbox_shared_path + '/local_settings.py' if netbox_local_settings_file_in_shared.stat.exists else omit }}"
153+ dest : " {{ netbox_config_path }}/local_settings.py"
154+ owner : " {{ netbox_user }}"
155+ group : " {{ netbox_group }}"
156+ state : " {{ 'link' if netbox_local_settings_file_in_shared.stat.exists else 'absent' }}"
157+ notify :
158+ - reload netbox.service
159+
136160- name : Copy NetBox scripts into SCRIPTS_ROOT
137161 copy :
138162 src : " {{ item.src }}"
You can’t perform that action at this time.
0 commit comments