Commit ba24f08c authored by Victor Nikulshin's avatar Victor Nikulshin
Browse files

Redeclare 'docker' role with the updated IP address

parent 1b52398d
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -139,6 +139,9 @@ def fab_update_container_ip(container_ip):
    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')))

    # Redeclare 'docker' role with updated IP
    env.roledefs['docker'] = ["drupalizer@{}".format(env.container_ip)]

    if os.path.exists(fab_path('local_vars.pyc')):
        # Clear cached bytecode file
        os.remove(fab_path('local_vars.pyc'))