]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Add tasks to update settings
authorZack Cerza <zack@redhat.com>
Thu, 4 Jun 2015 16:57:51 +0000 (10:57 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 29 Jun 2015 22:37:05 +0000 (16:37 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
roles/cobbler/tasks/settings.yml [new file with mode: 0644]

diff --git a/roles/cobbler/tasks/settings.yml b/roles/cobbler/tasks/settings.yml
new file mode 100644 (file)
index 0000000..6a5c4b6
--- /dev/null
@@ -0,0 +1,15 @@
+---
+- name: Enable dynamic settings modification
+  # Escape the colon below so the line will parse
+  lineinfile: dest=/etc/cobbler/settings regexp=^allow_dynamic_settings line="allow_dynamic_settings{{':'}} 1"
+  register: dynamic_settings
+
+- name: Restart cobbler
+  service:
+    name: "{{ cobbler_service }}"
+    state: restarted
+  when: dynamic_settings|changed
+
+- name: Update settings
+  command: cobbler setting edit --name={{ item.name }} --value={{ item.value}}
+  with_items: settings