Skip to content

Commit

Permalink
Create admin user
Browse files Browse the repository at this point in the history
  • Loading branch information
sjha4 committed Apr 3, 2020
1 parent dffc81e commit 390401e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions manifests/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
refreshonly => false,
}

pulpcore::admin { 'reset-admin-password --random':
unless => 'python3-django-admin dumpdata | grep "auth.user"',
refreshonly => false,
require => Pulpcore::Admin['migrate --noinput'],
}

include redis

}
4 changes: 4 additions & 0 deletions spec/acceptance/basic_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ class { 'redis::globals':
its(:exit_status) { is_expected.to eq 0 }
end

describe command("DJANGO_SETTINGS_MODULE=pulpcore.app.settings PULP_SETTINGS=/etc/pulp/settings.py python3-django-admin dumpdata | grep 'auth.user'") do
its(:exit_status) { is_expected.to eq 0 }
end

end

0 comments on commit 390401e

Please sign in to comment.