From 28c75e6e5c02ee0c796d378846c2ad8f7a3a8c22 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 16 Mar 2017 17:17:10 +0100 Subject: installer: support running as a system container Example: atomic install --system --set INVENTORY_FILE=$(pwd)/hosts.inventory \ --set SSH_ROOT=/root/.ssh \ --set PLAYBOOK_FILE=./playbooks/byo/config.yml openshift-ansible Signed-off-by: Giuseppe Scrivano --- system-container/root/usr/local/bin/run-system-container.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 system-container/root/usr/local/bin/run-system-container.sh (limited to 'system-container/root/usr/local') diff --git a/system-container/root/usr/local/bin/run-system-container.sh b/system-container/root/usr/local/bin/run-system-container.sh new file mode 100755 index 000000000..75dbfde03 --- /dev/null +++ b/system-container/root/usr/local/bin/run-system-container.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec ansible-playbook -i /etc/ansible/hosts ${OPTS} ${PLAYBOOK_FILE} -- cgit v1.2.3 From 11e470c7e198c3260c4bf66a069e2b7f8e21e519 Mon Sep 17 00:00:00 2001 From: Steve Milner Date: Mon, 20 Mar 2017 11:08:07 -0400 Subject: installer: Add system container variable for log saving A new environment variable, VAR_LOG_ANSIBLE_LOG, was created to allow the installer to bind mount the location and write the log back to the host. By default the value is /var/log/ansible.log Example: atomic install --system --set INVENTORY_FILE=$(pwd)/hosts.inventory \ --set SSH_ROOT=/root/.ssh \ --set VAR_LOG_ANSIBLE_LOG=/some/log/location/ansible.log \ --set PLAYBOOK_FILE=./playbooks/byo/config.yml openshift-ansible --- system-container/root/usr/local/bin/run-system-container.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'system-container/root/usr/local') diff --git a/system-container/root/usr/local/bin/run-system-container.sh b/system-container/root/usr/local/bin/run-system-container.sh index 75dbfde03..9ce7c7328 100755 --- a/system-container/root/usr/local/bin/run-system-container.sh +++ b/system-container/root/usr/local/bin/run-system-container.sh @@ -1,3 +1,4 @@ #!/bin/sh +export ANSIBLE_LOG_PATH=/var/log/ansible.log exec ansible-playbook -i /etc/ansible/hosts ${OPTS} ${PLAYBOOK_FILE} -- cgit v1.2.3