Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects
90-puppet-info 739 B
Newer Older
#!/bin/bash

if [ ! -r /etc/puppet/puppet.conf ]; then exit 0; fi

MASTER=$(sed -n '/^server/s/^.*=\(.*\)/\1/p' /etc/puppet/puppet.conf | tr -d '[:space:]')
PORT=$(sed -n '/^masterport/s/^.*=\(.*\)/\1/p' /etc/puppet/puppet.conf | tr -d '[:space:]')
ENVIRONMENT=$(sed -n '/^environment/s/^.*=\(.*\)/\1/p' /etc/puppet/puppet.conf | tr -d '[:space:]')

echo "** Dieser Host wird per Puppet verwaltet.
** Der Puppet Agent kann gesteuert werden mit:
      puppet agent --disable [\"<grund>\"]
      puppet agent --enable"

if [ ! -z $MASTER ]; then
  echo -e -n "\n** Puppetserver:\t\t$MASTER"
  if [ ! -z $PORT ]; then
    echo -n ":$PORT"
  fi
fi

if [ ! -z $ENVIRONMENT ]; then
  echo -e "\n** Puppet Environment:\t\t$ENVIRONMENT\n"
fi