Fix mariadb repo setup
Instead of always creating the mariadb default repository we should only do it when requested by the node environment. Do this implicitly via the mariadb_*_install resources that have an option to decide whether a repo should be set up or not. Change-Id: I4f62dd7a7df247ddb787553bef58ca81d8e062fb
This commit is contained in:
parent
0b08fc6142
commit
7ed8573899
|
@ -20,6 +20,8 @@
|
|||
|
||||
# MariaDB version
|
||||
default['openstack']['mariadb']['version'] = '10.3'
|
||||
# Whether to set up mariadb repo
|
||||
default['openstack']['mariadb']['setup_repo'] = true
|
||||
# Storage engine, base OpenStack requires the InnoDB flavor
|
||||
default['openstack']['mysql']['default-storage-engine'] = 'InnoDB'
|
||||
# InnoDB lock mode for generating auto-increment values
|
||||
|
|
|
@ -15,12 +15,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
mariadb_repository 'default' do
|
||||
version node['openstack']['mariadb']['version']
|
||||
end
|
||||
|
||||
mariadb_client_install 'default' do
|
||||
version node['openstack']['mariadb']['version']
|
||||
setup_repo node['openstack']['mariadb']['setup_repo']
|
||||
end
|
||||
|
||||
node['openstack']['db']['python_packages']['mariadb'].each do |pkg|
|
||||
|
|
|
@ -36,6 +36,7 @@ include_recipe 'openstack-ops-database::mariadb-client'
|
|||
mariadb_server_install 'default' do
|
||||
version node['openstack']['mariadb']['version']
|
||||
password super_password
|
||||
setup_repo node['openstack']['mariadb']['setup_repo']
|
||||
action [:install, :create]
|
||||
end
|
||||
|
||||
|
|
|
@ -14,10 +14,6 @@ describe 'openstack-ops-database::mariadb-client' do
|
|||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to add_mariadb_repository('default').with(version: '10.3')
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to install_mariadb_client_install('default').with(version: '10.3')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue