Skip to content

Commit

Permalink
Revert changes for merge defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
anramgop committed Oct 8, 2024
1 parent 254df0d commit 53b37c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 346 deletions.
63 changes: 0 additions & 63 deletions plugins/action/common/merge_defaults.py

This file was deleted.

258 changes: 0 additions & 258 deletions roles/validate/files/defaults.yml

This file was deleted.

31 changes: 6 additions & 25 deletions roles/validate/tasks/sub_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,32 +130,13 @@
ansible.builtin.include_tasks: manage_model_files_current.yml
when: check_roles['save_previous']

- name: Stat Factory Defaults
ansible.builtin.stat: path="{{ role_path }}/files/defaults.yml"
register: factory_defaults_file
- name: Stat Host Specific Defaults
ansible.builtin.stat: path="{{ role_path }}/defaults/{{ inventory_hostname }}/defaults.yml"
register: host_defaults
delegate_to: localhost

- name: Include Factory Defaults if Available
- name: Include Host Specific Defaults if Available
ansible.builtin.include_vars:
file: "{{ role_path }}/files/defaults.yml"
when: factory_defaults_file.stat.exists
delegate_to: localhost

- name: Stat Custom Specific Defaults
ansible.builtin.stat: path="{{ custom_defaults_path }}"
register: custom_defaults_file
delegate_to: localhost

- name: Include Custom Defaults if Available
ansible.builtin.include_vars:
file: "{{ custom_defaults_path }}"
when: custom_defaults_file.stat.exists
delegate_to: localhost

- name: Merge factory and custom defaults
when: custom_defaults_file.stat.exists
cisco.nac_dc_vxlan.common.merge_defaults:
factory_defaults: "{{ factory_defaults }}"
custom_defaults: "{{ defaults }}"
register: defaults
file: "{{ role_path }}/defaults/{{ inventory_hostname }}/defaults.yml"
when: host_defaults.stat.exists
delegate_to: localhost

0 comments on commit 53b37c7

Please sign in to comment.