Skip to content

Commit 3e62b6d

Browse files
committed
switch voxpupuli/container-puppetserver to voxpupuli/puppetserver, suppress docker CLI hints
Signed-off-by: circa10a <caleblemoine@gmail.com>
1 parent 357b90a commit 3e62b6d

File tree

3 files changed

+31
-13
lines changed

3 files changed

+31
-13
lines changed

auth.conf

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,25 @@ authorization: {
22
version: 1
33
rules: [
44
{
5-
match-request: {
6-
path: ".*"
7-
type: regex
8-
}
9-
allow-unauthenticated: true
10-
sort-order: 1
11-
name: "allow all"
5+
"allow-unauthenticated": true,
6+
"match-request": {
7+
"path": ".*",
8+
"type": "regex"
9+
},
10+
"name": "allow all",
11+
"sort-order": 1
1212
}
13+
,
14+
{
15+
"allow": "*",
16+
"match-request": {
17+
"method": "delete",
18+
"path": "/puppet-admin-api/v1/environment-cache",
19+
"type": "path"
20+
},
21+
"name": "puppet admin api clear caches",
22+
"sort-order": 500
23+
}
24+
1325
]
1426
}

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
services:
2-
puppet:
3-
container_name: puppet
2+
puppetserver:
3+
container_name: puppetserver
44
hostname: puppet
5-
image: voxpupuli/container-puppetserver
5+
image: voxpupuli/puppetserver
66
environment:
77
PUPPETSERVER_ENVIRONMENT_TIMEOUT: 0
88
ports:

run_puppet_agent.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22

33
# Run puppet agent every 15 seconds
44
INTERVAL=15
5-
CONTAINER_NAME=puppet
5+
CONTAINER_NAME=puppetserver
66
MODULE_DIR=/etc/puppetlabs/code/environments/production/modules
77
PUPPETFILE=/etc/puppetlabs/code/environments/production/Puppetfile
88

9+
# Suppress 'What's New' messages
10+
export DOCKER_CLI_HINTS=false
11+
912
# Check that container is running
10-
if [[ $(docker ps --filter "name=^/$CONTAINER_NAME$" --format '{{.Names}}') == $CONTAINER_NAME ]]; then
13+
if docker container inspect "$CONTAINER_NAME" > /dev/null 2>&1; then
1114
# Update package sources
1215
# Install deps
1316
docker exec -it $CONTAINER_NAME bash -c "r10k puppetfile install --verbose --puppetfile=$PUPPETFILE --moduledir=$MODULE_DIR"
@@ -16,4 +19,7 @@ if [[ $(docker ps --filter "name=^/$CONTAINER_NAME$" --format '{{.Names}}') == $
1619
docker exec -it $CONTAINER_NAME puppet agent -t
1720
sleep $INTERVAL
1821
done
19-
fi
22+
else
23+
echo "'${CONTAINER_NAME}' container is not running. Run 'docker compose up' and try again"
24+
exit 1
25+
fi

0 commit comments

Comments
 (0)