Commit 8d2405f2 by Heechul Kim

Added ANSIBLE_PLAYBOOK variables.

parent 82ff4d08
...@@ -27,6 +27,7 @@ from porch.config import APP_ROOT ...@@ -27,6 +27,7 @@ from porch.config import APP_ROOT
from porch.config import PORCH_USER from porch.config import PORCH_USER
from porch.config import PORCHSHELL from porch.config import PORCHSHELL
from porch.config import PROXY_URL, PROXY_PORT from porch.config import PROXY_URL, PROXY_PORT
from porch.config import ANSIBLE_PLAYBOOK
logging.config.fileConfig('logging.conf') logging.config.fileConfig('logging.conf')
log = logging.getLogger('porch') log = logging.getLogger('porch')
...@@ -194,8 +195,8 @@ def play_app(name, data): ...@@ -194,8 +195,8 @@ def play_app(name, data):
s_prikey = PRIKEY_DIR + '/prikey' s_prikey = PRIKEY_DIR + '/prikey'
s_ssh_options = "--ssh-common-args='-o UserKnownHostsFile=/dev/null \ s_ssh_options = "--ssh-common-args='-o UserKnownHostsFile=/dev/null \
-o StrictHostKeyChecking=no'" -o StrictHostKeyChecking=no'"
s_cmd= "ansible-playbook {0} -i {1}/hosts --private-key={2} {1}/site.yml"\ s_cmd= "{0} {1} -i {2}/hosts --private-key={3} {2}/site.yml"\
.format(s_ssh_options, s_play_dir, s_prikey) .format(ANSIBLE_PLAYBOOK, s_ssh_options, s_play_dir, s_prikey)
log.debug(s_cmd) log.debug(s_cmd)
# set logfile name # set logfile name
......
...@@ -73,8 +73,10 @@ IPMITOOL = '/usr/bin/ipmitool' ...@@ -73,8 +73,10 @@ IPMITOOL = '/usr/bin/ipmitool'
IPMIPOWER = '/usr/sbin/ipmipower' IPMIPOWER = '/usr/sbin/ipmipower'
IPMICONSOLE = '/usr/sbin/ipmiconsole' IPMICONSOLE = '/usr/sbin/ipmiconsole'
# Log # Log
OS_LOG = APP_ROOT + '/log/os' OS_LOG = APP_ROOT + '/log/os'
APP_LOG = APP_ROOT + '/log/app' APP_LOG = APP_ROOT + '/log/app'
FILE_LOG = APP_ROOT + '/log/file' FILE_LOG = APP_ROOT + '/log/file'
# ansible
ANSIBLE_PLAYBOOK = '/usr/local/bin/ansible-playbook'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment