Browse Source

enough: rename ovh to production

And set it in the openstack_cloud variable
keep-around/f99a43700a779f71e3a34fac7f749d436e43ce90
Loïc Dachary 1 year ago
committed by Loic Dachary
parent
commit
d92d2690a0
Signed by: dachary GPG Key ID: 992D23B392F9E4F2
  1. 2
      clouds.yml.example
  2. 4
      docs/community/contribute.rst
  3. 2
      docs/user-guide.rst
  4. 9
      inventory/group_vars/all/openstack.yml
  5. 14
      playbooks/backup/roles/backup/templates/openrc.sh
  6. 14
      playbooks/firewall/roles/firewall/tasks/firewall.yml
  7. 14
      playbooks/gitlab/roles/gitlab-ci/defaults/main.yml
  8. 4
      tests/run-tests.sh

2
clouds.yml.example

@ -1,7 +1,7 @@
---
# https://docs.openstack.org/python-openstackclient/latest/configuration/index.html#configuration-files
clouds:
ovh:
production:
auth:
auth_url: "https://auth.cloud.ovh.net/v3" # OS_AUTH_URL
project_name: "XXXXXX" # OS_TENANT_NAME

4
docs/community/contribute.rst

@ -193,8 +193,8 @@ fails, because the fixtures are supposed to thoroughly cleanup. But
bugs are to be expected in a test environment and it may be necessary
to manually remove leftovers, using the ``openstack`` command like so:
* ``tests/run-tests.sh env OS_CLIENT_CONFIG_FILE=~/.enough/dev/inventory/clouds.yml openstack --os-cloud ovh stack list``
* ``tests/run-tests.sh env OS_CLIENT_CONFIG_FILE=~/.enough/dev/clone-clouds.yml openstack --os-cloud ovh stack list``
* ``tests/run-tests.sh env OS_CLIENT_CONFIG_FILE=~/.enough/dev/inventory/clouds.yml openstack --os-cloud production stack list``
* ``tests/run-tests.sh env OS_CLIENT_CONFIG_FILE=~/.enough/dev/clone-clouds.yml openstack --os-cloud production stack list``
Ansible repository layout
-------------------------

2
docs/user-guide.rst

@ -442,7 +442,7 @@ Which is exactly equivalent to:
.. code::
$ OS_CLIENT_CONFIG_FILE=~/.enough/example.com/inventory/group_vars/all/clouds.yml \
openstack --os-cloud ovh help
openstack --os-cloud production help
Running ansible-playbook

9
inventory/group_vars/all/openstack.yml

@ -0,0 +1,9 @@
---
#
#############################################
#
# Key of the 'clouds' variable containing the credentials
# where OpenStack resources are provisionned. The 'clouds'
# variable is defined in the clouds.yml file.
#
openstack_cloud: production

14
playbooks/backup/roles/backup/templates/openrc.sh

@ -1,9 +1,9 @@
#!/usr/bin/env bash
export OS_AUTH_URL={{ clouds.ovh.auth.auth_url }}
export OS_AUTH_URL={{ clouds[openstack_cloud].auth.auth_url }}
export OS_IDENTITY_API_VERSION=3
export OS_PROJECT_NAME={{ clouds.ovh.auth.project_name }}
export OS_PROJECT_ID={{ clouds.ovh.auth.project_id }}
export OS_USER_DOMAIN_NAME={{ clouds.ovh.auth.user_domain_name }}
export OS_USERNAME={{ clouds.ovh.auth.username }}
export OS_PASSWORD={{ clouds.ovh.auth.password }}
export OS_REGION_NAME={{ clouds.ovh.region_name }}
export OS_PROJECT_NAME={{ clouds[openstack_cloud].auth.project_name }}
export OS_PROJECT_ID={{ clouds[openstack_cloud].auth.project_id }}
export OS_USER_DOMAIN_NAME={{ clouds[openstack_cloud].auth.user_domain_name }}
export OS_USERNAME={{ clouds[openstack_cloud].auth.username }}
export OS_PASSWORD={{ clouds[openstack_cloud].auth.password }}
export OS_REGION_NAME={{ clouds[openstack_cloud].region_name }}

14
playbooks/firewall/roles/firewall/tasks/firewall.yml

@ -5,13 +5,13 @@
- name: define os_auth
os_security_group: &os_auth
auth:
auth_url: "{{ clouds.ovh.auth.auth_url }}"
project_name: "{{ clouds.ovh.auth.project_name }}"
project_id: "{{ clouds.ovh.auth.project_id }}"
user_domain_name: "{{ clouds.ovh.auth.user_domain_name }}"
username: "{{ clouds.ovh.auth.username }}"
password: "{{ clouds.ovh.auth.password }}"
region_name: "{{ clouds.ovh.region_name }}"
auth_url: "{{ clouds[openstack_cloud].auth.auth_url }}"
project_name: "{{ clouds[openstack_cloud].auth.project_name }}"
project_id: "{{ clouds[openstack_cloud].auth.project_id }}"
user_domain_name: "{{ clouds[openstack_cloud].auth.user_domain_name }}"
username: "{{ clouds[openstack_cloud].auth.username }}"
password: "{{ clouds[openstack_cloud].auth.password }}"
region_name: "{{ clouds[openstack_cloud].region_name }}"
when: false
- name: security group

14
playbooks/gitlab/roles/gitlab-ci/defaults/main.yml

@ -2,10 +2,10 @@
gitlab_password: Ind+GriazAj2
gitlab_shared_runners_registration_token: 67ubD8XznZ7X4hv4hj9t
gitlab_os_auth_url: "{{ clouds.ovh.auth.auth_url }}"
gitlab_os_project_name: "{{ clouds.ovh.auth.project_name }}"
gitlab_os_project_id: "{{ clouds.ovh.auth.project_id }}"
gitlab_os_user_domain_name: "{{ clouds.ovh.auth.user_domain_name }}"
gitlab_os_username: "{{ clouds.ovh.auth.username }}"
gitlab_os_password: "{{ clouds.ovh.auth.password }}"
gitlab_os_region_name: "{{ clouds.ovh.region_name }}"
gitlab_os_auth_url: "{{ clouds[openstack_cloud].auth.auth_url }}"
gitlab_os_project_name: "{{ clouds[openstack_cloud].auth.project_name }}"
gitlab_os_project_id: "{{ clouds[openstack_cloud].auth.project_id }}"
gitlab_os_user_domain_name: "{{ clouds[openstack_cloud].auth.user_domain_name }}"
gitlab_os_username: "{{ clouds[openstack_cloud].auth.username }}"
gitlab_os_password: "{{ clouds[openstack_cloud].auth.password }}"
gitlab_os_region_name: "{{ clouds[openstack_cloud].region_name }}"

4
tests/run-tests.sh

@ -24,8 +24,8 @@ function prepare_inventory() {
cat > tests/clouds.yml <<EOF
---
clouds:
ovh:
auth:
production:
auth: &os_auth
auth_url: "$OS_AUTH_URL"
project_name: "$OS_PROJECT_NAME"
project_id: "$OS_PROJECT_ID"

Loading…
Cancel
Save