Skip to content

Commit

Permalink
added bash_completion_compat_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jardleex committed Jun 1, 2023
1 parent 0a9b4a7 commit 90b2115
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# @param arch Architecture of consul binary to download
# @param archive_path Path used when installing consul via the url
# @param bash_completion Whether to setup bash completion. Adjust bin_dir when install_method == package.
# @param bash_completion_compat_dir Directory to place bash-completion file for Consul into.
# @param bin_dir Directory to create the symlink to the consul binary in.
# @param binary_group The group that the file belongs to.
# @param binary_mode Permissions mode for the file.
Expand Down Expand Up @@ -97,6 +98,7 @@
String[1] $arch = $consul::params::arch,
Optional[Stdlib::Absolutepath] $archive_path = undef,
Boolean $bash_completion = $consul::params::bash_completion,
String[1] $bash_completion_compat_dir = $consul::params::bash_completion_compat_dir,
Stdlib::Absolutepath $bin_dir = $consul::params::bin_dir,
Optional[String[1]] $binary_group = $consul::params::binary_group,
String[1] $binary_mode = $consul::params::binary_mode,
Expand Down
7 changes: 6 additions & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@
}

if ($consul::bash_completion) and ($consul::install_method != 'docker' ) {
file { '/etc/bash_completion.d/consul':

file { $consul::bash_completion_compat_dir:
ensure => 'directory',
}

file { "${consul::bash_completion_compat_dir}/consul":
ensure => file,
owner => 'root',
group => 'root',
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
default: {
# 0 instead of root because OS X uses "wheel".
$data_dir_mode = '0755'
$bash_completion_compat_dir = '/etc/bash_completion.d/'
$binary_group = '0'
$binary_mode = '0555'
$binary_name = 'consul'
Expand Down

0 comments on commit 90b2115

Please sign in to comment.