Commit 10c7f2f9 authored by Victor Nikulshin's avatar Victor Nikulshin

Clear cached bytecode file after local_vars.py modification

parent 79f1e301
Pipeline #1724 passed with stages
in 2 minutes and 26 seconds
......@@ -136,9 +136,12 @@ def fab_remove_from_hosts(site_hostname):
def fab_update_container_ip(container_ip):
local('sed -i "/env.container_ip/d" {}/local_vars.py'.format(path.dirname(path.abspath(__file__))))
local('sed -i "/# Docker auto-added container IP/a env.container_ip = \'{}\'" '
'{}/local_vars.py'.format(''.join(container_ip), path.dirname(path.abspath(__file__))))
local('sed -i "/env.container_ip/d" {}'.format(fab_path('local_vars.py')))
local('sed -i "/# Docker auto-added container IP/a env.container_ip = \'{}\'" {}'.format(''.join(container_ip), fab_path('local_vars.py')))
if os.path.exists(fab_path('local_vars.pyc')):
# Clear cached bytecode file
os.remove(fab_path('local_vars.pyc'))
def fab_update_hosts(ip, site_hostname):
......
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 to comment