From 42ee7d8e9d3231d8579bb95c23ef35b8f22b9104 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Sat, 12 Feb 2022 17:02:14 -0500 Subject: [PATCH] fix sshkey_fetch var default --- ansible/playbooks/setup-distributed.yml | 12 ++++-------- ansible/playbooks/tasks/infra-host.yml | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/ansible/playbooks/setup-distributed.yml b/ansible/playbooks/setup-distributed.yml index 200a7cc..b388028 100644 --- a/ansible/playbooks/setup-distributed.yml +++ b/ansible/playbooks/setup-distributed.yml @@ -27,27 +27,23 @@ tasks: - name: Initialize nodes include_tasks: tasks/init-nodes.yml + tags: init - name: Reboot include_tasks: tasks/reboot.yml + tags: reboot - name: Setup infra hosts include_tasks: tasks/infra-host.yml when: tag.find("infra") != -1 # when on an infra tagged host + tags: infra - name: Setup storage hosts include_tasks: tasks/storage-host.yml when: tag.find("storage") != -1 # when on an infra tagged host + tags: storage post_tasks: - - name: Copy key to others - ansible.posix.authorized_key: - user: root - state: present - key: "{{ lookup('file', 'files/buffer/infra-id_rsa.pub') }}" - when: tag.find("infra") == -1 and sshkey_fetch - tags: sshkey - - name: Touching run file that ansible has ran here file: path: /var/log/ansible.run diff --git a/ansible/playbooks/tasks/infra-host.yml b/ansible/playbooks/tasks/infra-host.yml index 49f1ee2..52c6590 100644 --- a/ansible/playbooks/tasks/infra-host.yml +++ b/ansible/playbooks/tasks/infra-host.yml @@ -34,8 +34,8 @@ args: creates: /etc/openstack_deploy/user_secrets.yml.tar - #- import_tasks: tasks/python3-lxc.yml - # tags: python3-lxc +- import_tasks: tasks/python3-lxc.yml + tags: python3-lxc - name: "[AIO] Deploy and setup configuration / bootstrap" when: aio_install | default('false')