-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manage the static assets via a class
Since 8c66bff the pulpcore-manager command runs as root. On a fresh installation this is fine, but on upgrades the user doesn't own /var/lib/pulp/assets. This explicitly manages the static root. It is split off to a separate class to better capture the dependencies. The database doesn't need to refresh due to static files, nor any services.
- Loading branch information
Showing
4 changed files
with
24 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# @summary Manage the static files (assets) | ||
# @api private | ||
class pulpcore::static { | ||
file { $pulpcore::static_root: | ||
ensure => directory, | ||
owner => $pulpcore::user, | ||
group => $pulpcore::group, | ||
mode => '0755', | ||
} | ||
|
||
pulpcore::admin { 'collectstatic --noinput': | ||
refreshonly => true, | ||
subscribe => Concat['pulpcore settings'], | ||
require => File[$pulpcore::static_root], | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters