diff options
Diffstat (limited to 'roles/resolv_conf')
-rw-r--r-- | roles/resolv_conf/main.yml | 6 | ||||
-rw-r--r-- | roles/resolv_conf/tasks/main.yml | 16 | ||||
l--------- | roles/resolv_conf/templates | 1 | ||||
-rw-r--r-- | roles/resolv_conf/vars/FreeBSD.yml | 2 | ||||
-rw-r--r-- | roles/resolv_conf/vars/default.yml | 3 |
5 files changed, 28 insertions, 0 deletions
diff --git a/roles/resolv_conf/main.yml b/roles/resolv_conf/main.yml new file mode 100644 index 0000000..430c387 --- /dev/null +++ b/roles/resolv_conf/main.yml @@ -0,0 +1,6 @@ +--- +- hosts: all + vars_files: + - vars/default.yml + tasks: + - include: tasks/main.yml diff --git a/roles/resolv_conf/tasks/main.yml b/roles/resolv_conf/tasks/main.yml new file mode 100644 index 0000000..563b9cc --- /dev/null +++ b/roles/resolv_conf/tasks/main.yml @@ -0,0 +1,16 @@ +--- +- name: resolv_conf get vars + include_vars: default.yml + +- name: resolv_conf get OS vars + include_vars: '{{ item }}' + with_first_found: + - '{{ ansible_distribution }}.yml' + - default.yml + +- name: resolv_conf file + template: src='{{ item }}' dest='{{ resolv_file }}' owner=root group='{{ resolv_group }}' mode=0644 + with_first_found: + - files: + - 'resolv.conf.{{ ansible_distribution }}' + - resolv.conf diff --git a/roles/resolv_conf/templates b/roles/resolv_conf/templates new file mode 120000 index 0000000..a18a05a --- /dev/null +++ b/roles/resolv_conf/templates @@ -0,0 +1 @@ +../../company/resolv_conf-templates
\ No newline at end of file diff --git a/roles/resolv_conf/vars/FreeBSD.yml b/roles/resolv_conf/vars/FreeBSD.yml new file mode 100644 index 0000000..04e253e --- /dev/null +++ b/roles/resolv_conf/vars/FreeBSD.yml @@ -0,0 +1,2 @@ +--- +resolv_group: wheel diff --git a/roles/resolv_conf/vars/default.yml b/roles/resolv_conf/vars/default.yml new file mode 100644 index 0000000..24396bd --- /dev/null +++ b/roles/resolv_conf/vars/default.yml @@ -0,0 +1,3 @@ +--- +resolv_file: /etc/resolv.conf +resolv_group: root |