Skip to content

Commit 0ede5cd

Browse files
authored
Limiting ansible-playbook to localhost only (#336)
1 parent 7237130 commit 0ede5cd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

splunk/common-files/entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ start_and_exit() {
8080
sh -c "echo 'starting' > ${CONTAINER_ARTIFACT_DIR}/splunk-container.state"
8181
setup
8282
prep_ansible
83-
ansible-playbook $ANSIBLE_EXTRA_FLAGS -i inventory/environ.py site.yml
83+
ansible-playbook $ANSIBLE_EXTRA_FLAGS -i inventory/environ.py -l localhost site.yml
8484
}
8585

8686
start() {
@@ -91,15 +91,15 @@ start() {
9191

9292
configure_multisite() {
9393
prep_ansible
94-
ansible-playbook $ANSIBLE_EXTRA_FLAGS -i inventory/environ.py multisite.yml
94+
ansible-playbook $ANSIBLE_EXTRA_FLAGS -i inventory/environ.py -l localhost multisite.yml
9595
}
9696

9797
restart(){
9898
trap teardown EXIT
9999
sh -c "echo 'restarting' > ${CONTAINER_ARTIFACT_DIR}/splunk-container.state"
100100
prep_ansible
101101
${SPLUNK_HOME}/bin/splunk stop 2>/dev/null || true
102-
ansible-playbook -i inventory/environ.py start.yml
102+
ansible-playbook -i inventory/environ.py -l localhost start.yml
103103
watch_for_failure
104104
}
105105

uf/common-files/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ start_and_exit() {
7979
sh -c "echo 'starting' > ${CONTAINER_ARTIFACT_DIR}/splunk-container.state"
8080
setup
8181
prep_ansible
82-
ansible-playbook $ANSIBLE_EXTRA_FLAGS -i inventory/environ.py site.yml
82+
ansible-playbook $ANSIBLE_EXTRA_FLAGS -i inventory/environ.py -l localhost site.yml
8383
}
8484

8585
start() {
@@ -93,7 +93,7 @@ restart(){
9393
sh -c "echo 'restarting' > ${CONTAINER_ARTIFACT_DIR}/splunk-container.state"
9494
prep_ansible
9595
${SPLUNK_HOME}/bin/splunk stop 2>/dev/null || true
96-
ansible-playbook -i inventory/environ.py start.yml
96+
ansible-playbook -i inventory/environ.py -l localhost start.yml
9797
watch_for_failure
9898
}
9999

0 commit comments

Comments
 (0)