While we get a proper os_quota module in Ansible, let's just workaround
it with good old openstack client.
Change-Id: I4036359b09f5bb534143dcb18abe57586b6c8740
Along with the requirements change, there are also needed changes
roles_path and ansible_python_interpreter variable handling, for
some reason latest Ansible did not like current configuration.
Change-Id: I5fc78d479e276711365ea497edd4d3e38cacd650
Unfortunately, it seems Glance v2 does not have the capability to upload
an image by referencing a URL, it has to be a local file.
Adding logic to the role and flags should the user want to pull an image
to the Ansible control machine prior to the usual upload.
Change-Id: I2e2886287a045dab89fe712e39b42c2383d6aec6
Certain services are expected to be served by more than one server,
think of git mirrors, zuul workers etc.
While we could define all of them with numbered pattern manually
in the resources.yaml file, this gets unwieldy and boring
if the count is large, repeating on and on the same
server stanzas with just <service_name><$NODE_COUNT>.
This change allows to put a 'node_count' attribute to the server
resource. With it, the role will create as many servers as
'node_count' by numbering the servers as <server_name><$NODE_COUNT>.
e.g.
servers:
- name: logstash-worker.openstack.org
image: ubuntu-trusty
flavor: d1
node_count: 2
That would make the role to create two server instances named
'logstash-worker01.openstack.org' and 'logstash-worker02.openstack.org'
Change-Id: I220a2786efe56187f60f1eed2f32e661e6d3ed3f
Rather than copy-pasting around same tasks but changing slightly
the way we loop them when it's a per-profile or a per-cloud resource,
refactor the code a bit so both mechanisms call the same task.
e.g. the per-profile projects and per-cloud projects will call in the
end create_project, the only thing it varies is the loop prior to getting
the individual project items.
Change-Id: Ida2aebadafd4d60d11fa18aa2208dad235badd4c
This change adds a flag 'generate_keypair' that makes the
role to generate an ssh keypair, create an OpenStack keypair with
it and all the servers of the play will have that key baked in.
The folder, key type and key length are also configurable.
Change-Id: Iccbec24e9834c1fa03da8add94e069f622024537