fixes client configuration if no yet exists ceph.conf
diff --git a/ceph/client.sls b/ceph/client.sls
index 2b6f62d..1f511d7 100644
--- a/ceph/client.sls
+++ b/ceph/client.sls
@@ -5,9 +5,25 @@
pkg.installed:
- names: {{ client.pkgs }}
+/etc/ceph:
+ file.directory:
+ - user: root
+ - group: root
+ - mode: 755
+ - makedirs: True
+
{%- for keyring_name, keyring in client.keyring.iteritems() %}
/etc/ceph/ceph.client.{{ keyring_name }}.keyring:
+ file.managed:
+ - user: root
+ - group: root
+ - mode: 644
+ - replace: False
+ # bug, if file is empty no section is added by options_present
+ - contents: |
+ [client.{{ keyring_name }}]
+
ini.options_present:
- sections:
client.{{ keyring_name }}: {{ keyring|yaml }}
@@ -26,9 +42,18 @@
{%- endfor %}
/etc/ceph/ceph.conf:
+ file.managed:
+ - user: root
+ - group: root
+ - mode: 644
+ - replace: False
+ # bug, if file is empty no section is added by options_present
+ - contents: |
+ [global]
+
ini.options_present:
- sections: {{ config|yaml }}
- require:
- pkg: ceph_client_packages
-{%- endif %}
\ No newline at end of file
+{%- endif %}