Skip to content

Commit a7337c4

Browse files
committed
omit src attribute in symlink tasks during removal
1 parent 08f4294 commit a7337c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tasks/deploy_netbox.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126

127127
- name: Symlink/Remove NetBox LDAP configuration file into/from the active NetBox release
128128
ansible.builtin.file:
129+
# Omitting the src attribute is necessary when state: absent
129130
src: "{{ netbox_shared_path + '/ldap_config.py' if netbox_ldap_enabled else omit }}"
130131
dest: "{{ netbox_config_path }}/ldap_config.py"
131132
owner: "{{ netbox_user }}"
@@ -146,7 +147,8 @@
146147

147148
- name: Symlink/Remove NetBox local_settings.py file into/from the active NetBox release
148149
ansible.builtin.file:
149-
src: "{{ netbox_shared_path }}/local_settings.py"
150+
# Omitting the src attribute is necessary when state: absent
151+
src: "{{ netbox_shared_path + '/local_settings.py' if netbox_local_settings_file is defined else omit }}"
150152
dest: "{{ netbox_config_path }}/local_settings.py"
151153
owner: "{{ netbox_user }}"
152154
group: "{{ netbox_group }}"

0 commit comments

Comments
 (0)