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_client_install resource that has
an option to decide whether a repo should be set up or not.

Change-Id: I4f62dd7a7df247ddb787553bef58ca81d8e062fb
This commit is contained in:
Jens Harbott 2020-09-16 10:39:44 +02:00
parent 0b08fc6142
commit d805be6fa3
2 changed files with 1 additions and 8 deletions

View File

@ -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['mariadb']['use_default_repository']
end
node['openstack']['db']['python_packages']['mariadb'].each do |pkg|

View File

@ -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