File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
ansible/roles/deploy-crc-cloud/tasks Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 4141 dest : " {{ dnsmasq_conf_path }}"
4242 register : _dnsmasq_conf
4343
44+ - name : Add domains into crc-dnsmasq.conf when alternative_domain
45+ when : alternative_domain
46+ become : true
47+ ansible.builtin.blockinfile :
48+ path : " {{ dnsmasq_conf_path }}"
49+ block : |
50+ address=/apps.{{ eip }}.{{ alternative_domain }}/{{ ansible_default_ipv4.address }}
51+ address=/api.{{ eip }}.{{ alternative_domain }}/{{ ansible_default_ipv4.address }}
52+ address=/api-int.{{ eip }}.{{ alternative_domain }}/{{ ansible_default_ipv4.address }}
53+
4454 - name : Set this host as first nameserver in /etc/resolv.conf
4555 become : true
4656 ansible.builtin.lineinfile :
4959 line : " nameserver {{ item }}"
5060 create : true
5161 loop : " {{ [ansible_default_ipv4.address] + ansible_facts['dns']['nameservers'] | flatten }}"
52- register : _etc_resolv
5362
5463- name : Restart dnsmasq
55- when : _etc_resolv .changed
64+ when : _dnsmasq_conf .changed
5665 become : true
5766 ansible.builtin.systemd :
5867 name : dnsmasq
You can’t perform that action at this time.
0 commit comments