0

I've got the following OpenStack commands for setting up Swift object storage containers:

openstack container create $CONTAINER_NAME
openstack container set --property Full-Key=$CONTAINER_API_KEY $CONTAINER_NAME

I'd like to convert them to Ansible so they can be run as part of a role.

For the first command, I know I can use the os_object module for creating the container, but it doesn't appear to provide a parameter for setting a property, which in this case is for setting up key access to the container. (It's based on the documentation at Container Specific API Keys.)

So how would I execute the second command within Ansible natively, without resorting to running the shell command directly?

1

1 Answer 1

0

After further research, it's evident that it's currently impossible to do this natively. Therefore, we have to do this in the shell with the command module:

command: openstack container set --property Full-Key={{ KEY }} {{ CONTAINER }}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.