Files
python-manilaclient/roles/populate-manilaclient-config/tasks/main.yaml
Takashi Kajinami 177fe85865 Replace OS_TENANT_NAME
... because it was already removed[1] in favor of OS_PROJECT_NAME.

Also disable openstack-cli-server because it breaks credential switch
in ansible configuration tasks.

[1] 608489cd59b0d0f6f82937abb6a317489ac4d7a4

Change-Id: I008f34ee5458d209941c72aa9bf3f4b5b9c997e7
2024-07-17 09:44:12 +09:00

55 lines
2.5 KiB
YAML

- name: create the manilaclient config file
file:
path: "{{ manilaclient_config }}"
state: touch
- name: Set OS_ env variables to config
shell:
cmd: |
source {{ base_dir }}/devstack/functions
source {{ base_dir }}/devstack/openrc demo demo &>/dev/null
iniset {{ manilaclient_config }} DEFAULT username $OS_USERNAME
iniset {{ manilaclient_config }} DEFAULT tenant_name $OS_PROJECT_NAME
iniset {{ manilaclient_config }} DEFAULT password $OS_PASSWORD
iniset {{ manilaclient_config }} DEFAULT auth_url $OS_AUTH_URL
iniset {{ manilaclient_config }} DEFAULT project_domain_id $OS_PROJECT_DOMAIN_ID
iniset {{ manilaclient_config }} DEFAULT user_domain_id $OS_USER_DOMAIN_ID
source {{ base_dir }}/devstack/openrc admin demo &>/dev/null
iniset {{ manilaclient_config }} DEFAULT admin_username $OS_USERNAME
iniset {{ manilaclient_config }} DEFAULT admin_tenant_name $OS_PROJECT_NAME
iniset {{ manilaclient_config }} DEFAULT admin_password $OS_PASSWORD
iniset {{ manilaclient_config }} DEFAULT admin_auth_url $OS_AUTH_URL
iniset {{ manilaclient_config }} DEFAULT admin_project_domain_id $OS_PROJECT_DOMAIN_ID
iniset {{ manilaclient_config }} DEFAULT admin_user_domain_id $OS_USER_DOMAIN_ID
iniset {{ manilaclient_config }} DEFAULT access_types_mapping "nfs:ip,cifs:user"
# Tests
iniset {{ manilaclient_config }} DEFAULT suppress_errors_in_cleanup false
iniset {{ manilaclient_config }} DEFAULT run_migration_tests true
iniset {{ manilaclient_config }} DEFAULT run_manage_tests true
iniset {{ manilaclient_config }} DEFAULT run_mount_snapshot_tests true
iniset {{ manilaclient_config }} DEFAULT run_share_servers_migration_tests true
args:
executable: "/bin/bash"
- name: create a share network
shell:
cmd: |
source {{ base_dir }}/devstack/functions
source {{ base_dir }}/devstack/openrc demo demo &>/dev/null
NEUTRON_NET=$(openstack network show {{ neutron_network_name }} -c id -f value)
NEUTRON_SUBNET=$(openstack subnet show {{ neutron_subnet_name }} -c id -f value)
openstack share network create \
--name {{ share_network_name }} \
--neutron-net $NEUTRON_NET \
--neutron-subnet $NEUTRON_SUBNET
iniset {{ manilaclient_config }} DEFAULT share_network {{ share_network_name }}
iniset {{ manilaclient_config }} DEFAULT admin_share_network {{ share_network_name }}
args:
executable: "/bin/bash"