diff --git a/manifests/admin.pp b/manifests/admin.pp index c1e2e070..8b8c5403 100644 --- a/manifests/admin.pp +++ b/manifests/admin.pp @@ -1,4 +1,4 @@ -# @summary Run a python3-django-admin command +# @summary Run a pulpcore-manager command # # @param command # The command to run @@ -15,9 +15,6 @@ # The path to look for commands. # # @param pulp_settings -# The pulp settings file to use -# -# @param static_root # Root directory for static content # # @see exec @@ -27,16 +24,11 @@ Optional[String] $unless = undef, Array[Stdlib::Absolutepath] $path = ['/usr/bin'], Stdlib::Absolutepath $pulp_settings = $pulpcore::settings_file, - Stdlib::Absolutepath $static_root = $pulpcore::pulp_static_root, ) { Concat <| title == 'pulpcore settings' |> - -> exec { "python3-django-admin ${command}": + -> exec { "pulpcore-manager ${command}": path => $path, - environment => [ - 'DJANGO_SETTINGS_MODULE=pulpcore.app.settings', - "PULP_SETTINGS=${pulp_settings}", - "PULP_STATIC_ROOT=${static_root}", - ], + environment => ["PULP_SETTINGS=${pulp_settings}"], refreshonly => $refreshonly, unless => $unless, } diff --git a/spec/classes/pulpcore_spec.rb b/spec/classes/pulpcore_spec.rb index e735b5e1..a94e0094 100644 --- a/spec/classes/pulpcore_spec.rb +++ b/spec/classes/pulpcore_spec.rb @@ -249,12 +249,6 @@ it do is_expected.to compile.with_all_deps is_expected.to contain_file('/my/custom/directory') - is_expected.to contain_exec('python3-django-admin collectstatic --noinput') - .with_environment([ - "DJANGO_SETTINGS_MODULE=pulpcore.app.settings", - "PULP_SETTINGS=/etc/pulp/settings.py", - "PULP_STATIC_ROOT=/my/other/custom/directory" - ]) is_expected.to contain_systemd__unit_file('pulpcore-api.service') .with_content(%r{Environment="PULP_STATIC_ROOT=/my/other/custom/directory"}) is_expected.to contain_apache__vhost('pulpcore') diff --git a/spec/defines/admin_spec.rb b/spec/defines/admin_spec.rb index 4ad6157a..fd10a123 100644 --- a/spec/defines/admin_spec.rb +++ b/spec/defines/admin_spec.rb @@ -6,11 +6,10 @@ let(:facts) { os_facts } let(:title) { 'help' } - context 'with a fixed pulp_settings and static_root' do + context 'with a fixed pulp_settings' do let(:params) do { pulp_settings: '/etc/pulpcore/settings.py', - static_root: '/var/lib/pulp/assets', } end @@ -18,11 +17,7 @@ it do is_expected.to compile.with_all_deps is_expected.to contain_exec('python3-django-admin help') - .with_environment([ - 'DJANGO_SETTINGS_MODULE=pulpcore.app.settings', - 'PULP_SETTINGS=/etc/pulpcore/settings.py', - 'PULP_STATIC_ROOT=/var/lib/pulp/assets', - ]) + .with_environment(['PULP_SETTINGS=/etc/pulpcore/settings.py']) .with_refreshonly(false) .with_unless(nil) end @@ -34,18 +29,13 @@ command: 'migrate --noinput', refreshonly: true, unless: '/usr/bin/false', - static_root: '/var/lib/pulp/assets', ) end it do is_expected.to compile.with_all_deps is_expected.to contain_exec('python3-django-admin migrate --noinput') - .with_environment([ - 'DJANGO_SETTINGS_MODULE=pulpcore.app.settings', - 'PULP_SETTINGS=/etc/pulpcore/settings.py', - 'PULP_STATIC_ROOT=/var/lib/pulp/assets', - ]) + .with_environment(['PULP_SETTINGS=/etc/pulpcore/settings.py']) .with_refreshonly(true) .with_unless('/usr/bin/false') end @@ -61,11 +51,7 @@ is_expected.to contain_pulpcore__admin('help').with_pulp_settings('/etc/pulp/settings.py') is_expected.to contain_concat('pulpcore settings') is_expected.to contain_exec('python3-django-admin help') - .with_environment([ - 'DJANGO_SETTINGS_MODULE=pulpcore.app.settings', - 'PULP_SETTINGS=/etc/pulp/settings.py', - 'PULP_STATIC_ROOT=/var/lib/pulp/assets', - ]) + .with_environment(['PULP_SETTINGS=/etc/pulp/settings.py']) .with_refreshonly(false) .with_unless(nil) .that_requires('Concat[pulpcore settings]')