diff --git a/elements/ironic-discoverd/os-apply-config/etc/ironic-discoverd/discoverd.conf b/elements/ironic-discoverd/os-apply-config/etc/ironic-discoverd/discoverd.conf index b74e97aa6..d7997c4ce 100644 --- a/elements/ironic-discoverd/os-apply-config/etc/ironic-discoverd/discoverd.conf +++ b/elements/ironic-discoverd/os-apply-config/etc/ironic-discoverd/discoverd.conf @@ -18,4 +18,4 @@ ironic_retry_period = 10 username = ironic password = {{ironic.service-password}} tenant_name = service -os_auth_url = http://{{local-ip}}:5000/v2.0 \ No newline at end of file +os_auth_url = http://{{local-ip}}:5000/v2.0 diff --git a/elements/ironic-discoverd/os-refresh-config/post-configure.d/99-admin-swiftoperator-role b/elements/ironic-discoverd/os-refresh-config/post-configure.d/99-admin-swiftoperator-role new file mode 100755 index 000000000..05d959c4e --- /dev/null +++ b/elements/ironic-discoverd/os-refresh-config/post-configure.d/99-admin-swiftoperator-role @@ -0,0 +1,13 @@ +#!/bin/bash +# In order for CFME to access the Swift objects with hardware data about +# the Ironic nodes, we need to give the admin user the swiftoperator role +# on the service tenant. + +set -eux + +source /root/stackrc + +# We need to make sure the role is not already added +if ! openstack role list --user admin --project service | grep swiftoperator; then + openstack role add --user admin --project service swiftoperator +fi