Skip to content

Commit

Permalink
Manage the installation directory's mode
Browse files Browse the repository at this point in the history
Fixes #377
  • Loading branch information
oranenj committed May 7, 2021
1 parent 2a0c7eb commit 50b8160
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
14 changes: 13 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
# User that the service will run as
# @param group
# Group that the service will run as
# @param installdir_owner
# The owner of the installation directory.
# @param installdir_group
# The group of the installation directory.
# @param installdir_mode
# The permissions of the installation directory. Note that the JIRA service user must have at least execute permission on the directory.
# @param homedir_mode
# The permissions of the service user's home directory, where JIRA's data will reside
# @param uid
# The desired UID for the service user
# @param gid
Expand Down Expand Up @@ -270,6 +278,10 @@
Boolean $manage_user = true,
String $user = 'jira',
String $group = 'jira',
String $installdir_owner = 'root',
String $installdir_group = 'root',
Stdlib::Filemode $installdir_mode = '0755',
Optional[Stdlib::Filemode] $homedir_mode = undef,
Optional[Integer[0]] $uid = undef,
Optional[Integer[0]] $gid = undef,
Stdlib::Absolutepath $shell = '/bin/true',
Expand All @@ -293,7 +305,7 @@
Optional[String] $dburl = undef,
Optional[String] $connection_settings = undef,
Boolean $oracle_use_sid = true,
$dbschema = undef,
Optional[String] $dbschema = undef,
# MySQL Connector Settings
Boolean $mysql_connector_manage = true,
String $mysql_connector_version = '8.0.23',
Expand Down
6 changes: 4 additions & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@
ensure => 'directory',
owner => $jira::user,
group => $jira::group,
mode => $jira::homedir_mode,
}

if ! defined(File[$jira::installdir]) {
file { $jira::installdir:
ensure => 'directory',
owner => 'root',
group => 'root',
owner => $jira::installdir_owner,
group => $jira::installdir_group,
mode => $jira::installdir_mode
}
}

Expand Down

0 comments on commit 50b8160

Please sign in to comment.