diff options
author | B Stack <bgstack15@gmail.com> | 2016-09-23 10:27:15 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2016-09-23 10:27:15 -0400 |
commit | 5e8a7ac51e486044c8d14694e5f51173dd63f628 (patch) | |
tree | 586bba6cab996f95a39f6a4620e457cf5924d770 /roles/resolv_conf | |
parent | Initial file upload (diff) | |
download | ansible01-5e8a7ac51e486044c8d14694e5f51173dd63f628.tar.gz ansible01-5e8a7ac51e486044c8d14694e5f51173dd63f628.tar.bz2 ansible01-5e8a7ac51e486044c8d14694e5f51173dd63f628.zip |
Initial file upload
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 |