2022-05-02 22:03:37 -05:00
|
|
|
- name: load version information
|
2022-05-05 08:17:48 -05:00
|
|
|
ansible.builtin.include_vars: "{{ item }}"
|
2022-05-02 22:03:37 -05:00
|
|
|
loop:
|
|
|
|
|
- "{{ role_path }}/vars/{{ ansible_facts['os_family'] }}.yml"
|
|
|
|
|
- "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}.yml"
|
|
|
|
|
- "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}_{{ ansible_facts['distribution_major_version'] }}.yml"
|
|
|
|
|
- "{{ role_path }}/vars/{{ ansible_facts['distribution'] }}_{{ ansible_facts['distribution_version'] }}.yml"
|
|
|
|
|
when: item is file
|
|
|
|
|
|
|
|
|
|
- name: modify init file
|
|
|
|
|
become: true
|
2022-05-05 08:17:48 -05:00
|
|
|
ansible.builtin.replace:
|
2022-05-02 22:03:37 -05:00
|
|
|
path: "{{ init_file }}"
|
|
|
|
|
replace: "{{ init_replace }}"
|
|
|
|
|
regexp: "{{ init_regexp }}"
|
|
|
|
|
when: init_file is defined
|