summaryrefslogtreecommitdiff
path: root/strata/openstack-services/cinder.morph
diff options
context:
space:
mode:
authorFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-02-16 17:34:52 +0000
committerFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-02-16 17:34:52 +0000
commita1e72580acc64d771ca275b7ccbdce20869f4d4e (patch)
tree919c739d3806b3f7a70391a1bc130b941adf8b94 /strata/openstack-services/cinder.morph
parentbff80de680dd2db375b09a073443975f32a63b51 (diff)
downloaddefinitions-a1e72580acc64d771ca275b7ccbdce20869f4d4e.tar.gz
Add sudoers files for cinder, nova and neutron on post-install time
Diffstat (limited to 'strata/openstack-services/cinder.morph')
-rw-r--r--strata/openstack-services/cinder.morph7
1 files changed, 7 insertions, 0 deletions
diff --git a/strata/openstack-services/cinder.morph b/strata/openstack-services/cinder.morph
index bfc31026..eafc7cea 100644
--- a/strata/openstack-services/cinder.morph
+++ b/strata/openstack-services/cinder.morph
@@ -7,3 +7,10 @@ post-install-commands:
# Move rootwrap files to a proper location
- mkdir -p "$DESTDIR"/etc/cinder/rootwrap.d
- install -D -m 644 etc/cinder/rootwrap.d/* "$DESTDIR"/etc/cinder/rootwrap.d/
+# Add cinder to sudoers controlling which commands will run as a root
+# using the openstack rootwrap.
+- mkdir -p "$DESTDIR"/etc/sudoers.d
+- |
+ install -D -m 0440 /proc/self/fd/0 <<'EOF' "$DESTDIR"/etc/sudoers.d/cinder-rootwrap
+ cinder ALL=(root) NOPASSWD: /usr/bin/cinder-rootwrap /etc/cinder/rootwrap.conf *
+ EOF