From b62ae62906b8be16955315c3416dde260685c7e3 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 8 Oct 2019 15:46:16 +1100 Subject: [PATCH] autocluster: Run ssh setup during host setup Signed-off-by: Martin Schwenke --- autocluster.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/autocluster.py b/autocluster.py index f897e78..74c30ed 100755 --- a/autocluster.py +++ b/autocluster.py @@ -706,12 +706,16 @@ def cluster_command(cluster, command): usage() +def get_host_setup_path(file): + '''Return the path for host setup file''' + + return os.path.join(INSTALL_DIR, 'ansible/host', file) + + def get_platform_file(platform): '''Return the name of the host setup file for platform''' - return os.path.join(INSTALL_DIR, - 'ansible/host', - 'autocluster_setup_%s.yml' % platform) + return get_host_setup_path('autocluster_setup_%s.yml' % platform) def sanity_check_platform_name(platform): @@ -729,8 +733,9 @@ def host_setup(platform): announce('host', platform, 'setup') platform_file = get_platform_file(platform) + ssh_file = get_host_setup_path('autocluster_setup_%s.yml' % 'ssh') os.environ['ANSIBLE_RETRY_FILES_ENABLED'] = 'false' - args = ['ansible-playbook', platform_file] + args = ['ansible-playbook', platform_file, ssh_file] try: subprocess.check_call(args) -- 2.34.1