diff --git a/playbooks/services.yml b/playbooks/services.yml new file mode 100644 index 0000000..0253201 --- /dev/null +++ b/playbooks/services.yml @@ -0,0 +1,9 @@ +- name: Configure Directory, Time, and Database Services + hosts: all + tasks: + - import_role: + name: ldap_samba + - import_role: + name: timeserver + - import_role: + name: database diff --git a/roles/services/defaults/main.yaml b/roles/services/defaults/main.yaml new file mode 100644 index 0000000..3de00ea --- /dev/null +++ b/roles/services/defaults/main.yaml @@ -0,0 +1,2 @@ +variable1: false +variable2_checked: false diff --git a/roles/services/handlers/main.yml b/roles/services/handlers/main.yml new file mode 100644 index 0000000..38832ee --- /dev/null +++ b/roles/services/handlers/main.yml @@ -0,0 +1,6 @@ +- name: restart service + systemd: + name: service + state: restarted +- name: update example_command configuration + command: /usr/sbin/example_command diff --git a/roles/services/tasks/main.yml b/roles/services/tasks/main.yml new file mode 100644 index 0000000..ec88628 --- /dev/null +++ b/roles/services/tasks/main.yml @@ -0,0 +1,5 @@ +- import_tasks: witness.yml + tags: witness +- import_tasks: task.yml + tags: task + diff --git a/roles/services/templates/resolv.conf b/roles/services/templates/resolv.conf new file mode 100644 index 0000000..52a1891 --- /dev/null +++ b/roles/services/templates/resolv.conf @@ -0,0 +1,7 @@ +domain {{ host_domain }} +search {{ host_domain }} +{% if resolvers is defined %} +{% for resolver in resolvers %} +nameserver {{resolver}} +{% endfor %} +{% endif %} \ No newline at end of file