Skip to content

Commit

Permalink
Fixing the issue when installing puppet-agent on RHEL systems
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Aug 10, 2017
1 parent 539c8a1 commit 9702a81
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions puppeter/persistence/gateway/bash-libraries.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set +x
function reload_shell {
set +e
set +ex
local files='~/.bash_profile ~/.bash_login ~/.profile'
if [ -f /etc/profile ]; then
. /etc/profile
Expand All @@ -12,6 +12,6 @@ function reload_shell {
break
fi
done
set -e
set -ex
}
set -x
2 changes: 0 additions & 2 deletions puppeter/persistence/gateway/csr.pp
@@ -1,7 +1,5 @@
file { "${settings::confdir}/csr_attributes.yaml":
ensure => 'file',
owner => 'puppet',
group => 'puppet',
mode => '0640',
content => '@{content}'
}
Expand Up @@ -3,4 +3,5 @@ set +e
if ! rpm -q 'puppet-agent'; then
set -e
yum install -y puppet-agent
reload_shell
fi
8 changes: 5 additions & 3 deletions puppeter/persistence/gateway/set-fqdn.sh
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
puppet resource host '@{fqdn}' ensure=present host_aliases='@{hostname}' ip=127.0.0.1 comment='FQDN'
hostname '@{hostname}'
reload_shell
if [[ "$(hostname -f)" != '@{fqdn}' ]]; then
puppet resource host '@{fqdn}' ensure=present host_aliases='@{hostname}' ip=127.0.0.1 comment='FQDN'
hostname '@{hostname}'
reload_shell
fi

0 comments on commit 9702a81

Please sign in to comment.