feat: cleanup consul from url install (#239)

- set bind_dir to be /usr/bin for rhel, /usr/local/bin for debian
- remove url-installed consul from rhel

Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/239
This commit is contained in:
Ben Vincent 2025-03-30 18:40:09 +11:00
parent 6cb249ffbc
commit 829b1b05fd
3 changed files with 8 additions and 0 deletions

View File

@ -167,6 +167,7 @@ profiles::base::puppet_servers:
consul::install_method: 'package' consul::install_method: 'package'
consul::manage_repo: false consul::manage_repo: false
consul::bin_dir: /usr/bin
profiles::dns::master::basedir: '/var/named/sources' profiles::dns::master::basedir: '/var/named/sources'
profiles::dns::base::ns_role: 'roles::infra::dns::resolver' profiles::dns::base::ns_role: 'roles::infra::dns::resolver'

View File

@ -16,3 +16,4 @@ networking::nwmgr_dns_none: false
consul::install_method: 'url' consul::install_method: 'url'
consul::manage_repo: false consul::manage_repo: false
consul::bin_dir: /usr/local/bin

View File

@ -85,4 +85,10 @@ class profiles::consul::client (
require => File['/root/.config'], require => File['/root/.config'],
} }
# cleanup /usr/local/bin/consul which was created by url install method
if $facts['os']['family'] == 'RedHat' {
file {'/usr/local/bin/consul':
ensure => absent,
}
}
} }