Commit Graph

13 Commits

Author SHA1 Message Date
Jonathan Rosser b4f6b665b2 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I8d1787e14f818c553f398adde554816856ef1a17
2021-02-25 12:24:54 +00:00
siavashsardari fdc640ddcb Adding support of system scoped openrc and clouds.yaml
Change-Id: Iff5a0892d812601c0fa3fd549b7f00a468cfdd97
Closes-Bug: 1903656
2020-11-17 11:22:47 +03:30
Dmitriy Rabotyagov b79fade909 Add option to redefine locale
Since CentOS do not support C.UTF-8 locale[1] we're placing system
default inside openrc file. If locale can't be found from gathered facts
it's defaulted to C.UTF-8.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1361965

Change-Id: I304bacf0e586b119ac41757b96fa237d2839aaf5
2019-08-13 19:47:19 +03:00
cloudnull 8151224987 Add manila service to openrc file
This change ensures manila clients work with our default openrc file.

Change-Id: I58dab920d2561ffa88064fc89cbf1406e95a3d7e
Signed-off-by: cloudnull <kevin@cloudnull.com>
2019-03-22 20:49:40 +00:00
Jesse Pretorius 838100cf26 Add default for openrc_os_domain_name and update example
There is currently no default value for openrc_os_domain_name,
so we add one, and we update the example to remove the unnecessary
overrides.

Change-Id: Ic18b07d9347260faf828a55112f0b38e86e617f5
2018-10-22 16:00:03 +01:00
Kourosh Vivan 93dc5f50df Add OS_AUTH_TYPE env var in openrc file
For gnocchi cli this env var is mandatory in the openrc.

Default value: password

Closes-Bug: 1781552
Change-Id: I1e54d53dd131351dda70d3d166ae8e2029caa1cb
2018-07-13 15:00:22 +02:00
Jimmy McCrory db09d4c96e Add defaults for keystone insecure variables
The default for 'openrc_insecure' was not working as expected. Both of
the inner variables were evaluated as booleans first and the expression
would fail if either was undefined.

Change-Id: I5f296bfe6cab43ad782ae063ed9ed25414e316fc
2017-12-11 09:37:32 -08:00
Jason Hedden 428e7c55f6 Update file and directory permissions
Currently the clouds.yaml directory permissions are hardcoded and
missing the execute bit. When using this role with a default location in
/etc/openstack, normal system users are not able to read the
configuration file.

This commit adds variable overrides for the file and directory
permissions, as well as correcting the directory permissions.

Change-Id: I2380030235d455ff4dd0ea7658c7146ece60db81
Closes-Bug: #1689837
2017-05-10 12:52:44 -05:00
Tim Laszlo c6dec23ba1 Define region name variables in openrc and clouds.
Add OS_REGION_NAME to the openrc file.  Replaces openrc_clouds_yml_region_name
with a common openrc_service_region variable.

Change-Id: I68cbd6b2aaa64ef655cfc617a96d428fb2c35d2b
2016-07-23 08:54:45 -05:00
Travis Truman 38ef6fc90c Correct filename of clouds.yml to clouds.yaml
According to the python-openstackclient doc, the correct
filename is clouds.yaml. See
http://docs.openstack.org/developer/python-openstackclient/configuration.html
for details.

Change-Id: If7dea05f6787b4dc94369d5f1a6db8dd20741697
2016-03-02 13:33:41 -05:00
Byron McCollum 0cd1a41a6b Implement OpenStack client clouds.yml configuration file
OpenStack client supports defining one or more sets of credentials
inside a clouds.yml configuration file. A default configuration has
been created named `default` that contains the same admin credentials
from the `openrc` file currently being templated.

The default configuration can be specified using the following:

openstack --os-cloud default <command>

Change-Id: Icc0c06a9b9a9e2e75b58fe90b4da9dd46b63e7f4
2015-12-15 20:47:43 -06:00
Jesse Pretorius c190c7622d Enable all services to use Keystone 'insecurely'
This patch introduces an insecure flag for the Keystone internal
 and admin endpoints:

* keystone_service_adminuri_insecure
* keystone_service_internaluri_insecure

Both values default to false. If you have setup SSL endpoints
for Keystone using an untrusted certificate then you should
set the appropriate flag to true in your user_variables.

This patch is used to enable testing and development with
Keystone SSL endpoints without having to make use of SSL
certificates signed by a trusted, public CA.

The patch introduces a new optional argument (insecure) to the
keystone, glance and neutron Ansible libraries. This is a
boolean value which, when true, enables these libraries to
access Keystone endpoints 'insecurely'. When these libraries
are used in plays, the appropriate value is set automatically
as per the above conditions.

Implements: blueprint keystone-federation
Change-Id: Ia07e7e201f901042dd06a86efe5c6f6725e9ce13
2015-07-10 14:06:25 +01:00
Kevin Carter 34b5861a86 Convert existing roles into galaxy roles
This change implements the blueprint to convert all roles and plays into
a more generic setup, following upstream ansible best practices.

Items Changed:
* All tasks have tags.
* All roles use namespaced variables.
* All redundant tasks within a given play and role have been removed.
* All of the repetitive plays have been removed in-favor of a more
  simplistic approach. This change duplicates code within the roles but
  ensures that the roles only ever run within their own scope.
* All roles have been built using an ansible galaxy syntax.
* The `*requirement.txt` files have been reformatted follow upstream
  Openstack practices.
* Dynamically generated inventory is now more organized, this should assist
  anyone who may want or need to dive into the JSON blob that is created.
  In the inventory a properties field is used for items that customize containers
  within the inventory.
* The environment map has been modified to support additional host groups to
  enable the seperation of infrastructure pieces. While the old infra_hosts group
  will still work this change allows for groups to be divided up into seperate
  chunks; eg: deployment of a swift only stack.
* The LXC logic now exists within the plays.
* etc/openstack_deploy/user_variables.yml has all password/token
  variables extracted into the separate file
  etc/openstack_deploy/user_secrets.yml in order to allow seperate
  security settings on that file.

Items Excised:
* All of the roles have had the LXC logic removed from within them which
  should allow roles to be consumed outside of the `os-ansible-deployment`
  reference architecture.

Note:
* the directory rpc_deployment still exists and is presently pointed at plays
  containing a deprecation warning instructing the user to move to the standard
  playbooks directory.
* While all of the rackspace specific components and variables have been removed
  and or were refactored the repository still relies on an upstream mirror of
  Openstack built python files and container images. This upstream mirror is hosted
  at rackspace at "http://rpc-repo.rackspace.com" though this is
  not locked to and or tied to rackspace specific installations. This repository
  contains all of the needed code to create and/or clone your own mirror.

DocImpact
Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Closes-Bug: #1403676
Implements: blueprint galaxy-roles
Change-Id: I03df3328b7655f0cc9e43ba83b02623d038d214e
2015-02-18 10:56:25 +00:00