# Don't set -U as that will upgrade Paramiko to a non-2.6 compatible version. run("pip install -q ansible==%s", ci_lib.ANSIBLE_VERSION) run("mkdir %s", HOSTS_DIR) run("ln -s %s/hosts/common-hosts %s", TESTS_DIR, HOSTS_DIR) with open(os.path.join(HOSTS_DIR, 'target'), 'w') as fp: fp.write('[test-targets]\n') for i, distro in enumerate(ci_lib.DISTROS): fp.write("target-%s " "ansible_host=%s " "ansible_port=%s " "ansible_user=mitogen__has_sudo_nopw " "ansible_password=has_sudo_nopw_password" "\n" % ( distro, ci_lib.DOCKER_HOSTNAME, BASE_PORT + i, )) # Build the binaries. # run("make -C %s", TESTS_DIR) if not ci_lib.exists_in_path('sshpass'): run("sudo apt-get update") run("sudo apt-get install -y sshpass") with ci_lib.Fold('ansible'): run('/usr/bin/time ./run_ansible_playbook.sh all.yml -i "%s" %s', HOSTS_DIR, ' '.join(sys.argv[1:]))
# Don't set -U as that will upgrade Paramiko to a non-2.6 compatible version. run("pip install -q ansible==%s", ci_lib.ANSIBLE_VERSION) run("mkdir %s", HOSTS_DIR) run("ln -s %s/common-hosts %s", TESTS_DIR, HOSTS_DIR) with open(os.path.join(HOSTS_DIR, 'target'), 'w') as fp: fp.write('[test-targets]\n') for i, distro in enumerate(ci_lib.DISTROS): fp.write("target-%s " "ansible_host=%s " "ansible_port=%s " "ansible_user=mitogen__has_sudo_nopw " "ansible_password=has_sudo_nopw_password" "\n" % ( distro, ci_lib.DOCKER_HOSTNAME, BASE_PORT + i, )) # Build the binaries. run("make -C %s", TESTS_DIR) if not ci_lib.exists_in_path('sshpass'): run("sudo apt-get update") run("sudo apt-get install -y sshpass") with ci_lib.Fold('ansible'): run('/usr/bin/time ./run_ansible_playbook.sh all.yml -i "%s" %s', HOSTS_DIR, ' '.join(sys.argv[1:]))