Resolv.conf can be non-default now

This commit is contained in:
László Károlyi 2019-01-10 23:09:57 +01:00
parent 24981f1e88
commit af8417da32
Signed by: karolyi
GPG key ID: 2DCAF25E55735BFE

View file

@ -31,10 +31,26 @@
src: rc.conf
dest: '{{ vars["jail_" + jail_name + "_new_path"] }}/etc'
- name: Templating resolv.conf for jail
template:
src: resolv.conf.j2
dest: '{{ vars["jail_" + jail_name + "_new_path"] }}/etc/resolv.conf'
register: template_resolv
ignore_errors: yes
- name: Copy local resolv.conf over to the new jail
copy:
src: resolv.conf
dest: '{{ vars["jail_" + jail_name + "_new_path"] }}/etc'
register: local_resolv
ignore_errors: yes
when: template_resolv is failed
- name: Copy resolv.conf over to the new jail
copy:
src: /etc/resolv.conf
dest: '{{ vars["jail_" + jail_name + "_new_path"] }}/etc'
when: local_resolv is failed
- name: Setup timezone in jail
command: