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?

colan
  • 173
  • 1
  • 6

1 Answers1

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 }}
colan
  • 173
  • 1
  • 6