]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Set the server by editing /etc/cobbler/settings
authorZack Cerza <zack@redhat.com>
Fri, 19 Jun 2015 22:10:22 +0000 (16:10 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 29 Jun 2015 22:37:07 +0000 (16:37 -0600)
Otherwise, using 'cobbler setting edit' might not work

Signed-off-by: Zack Cerza <zack@redhat.com>
roles/cobbler/tasks/settings.yml

index 6a5c4b6cd863cf64408a101ca792895af07a152a..cadeaad815ac50e31619d3ca58f1e48e741045cd 100644 (file)
@@ -4,11 +4,16 @@
   lineinfile: dest=/etc/cobbler/settings regexp=^allow_dynamic_settings line="allow_dynamic_settings{{':'}} 1"
   register: dynamic_settings
 
+- name: Set server value
+  # Escape the colon below so the line will parse
+  lineinfile: dest=/etc/cobbler/settings regexp="^server{{':'}}" line="server{{'\:'}} {% for setting in settings %}{% if setting.name == 'server' %}{{ setting.value }}{% endif %}{% endfor %}"
+  register: server_value
+
 - name: Restart cobbler
   service:
     name: "{{ cobbler_service }}"
     state: restarted
-  when: dynamic_settings|changed
+  when: dynamic_settings|changed or server_value|changed
 
 - name: Update settings
   command: cobbler setting edit --name={{ item.name }} --value={{ item.value}}