X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ansible%2Fsetup.yml;h=9e4f051dd54fb60c34334708f93a6aec24512c14;hb=74fb03740dbea79e45d37c36d66e6159c695aaf7;hp=ec57297346d0fc16e246ad7597527c259f70684d;hpb=a60b6ea6a2dd7adaebb40caa5fa5693d2a9313fd;p=oom%2Foffline-installer.git diff --git a/ansible/setup.yml b/ansible/setup.yml index ec572973..9e4f051d 100644 --- a/ansible/setup.yml +++ b/ansible/setup.yml @@ -1,26 +1,6 @@ --- -- hosts: localhost +- name: Setup nodes for installer + hosts: all gather_facts: false - tasks: - - name: "Check and generate key if needed" - block: - - stat: - path: '{{ private_key }}.pub' - register: p - - - command: ssh-keygen -f {{ private_key }} -t rsa -N '' - when: not p.stat.exists - vars: - private_key: /root/.ssh/offline_ssh_key - -- hosts: all - gather_facts: false - tasks: - - name: Setup authorized_keys file - authorized_key: - user: root - state: present - key: "{{ lookup('file', public_key) }}" - become: true - vars: - public_key: /root/.ssh/offline_ssh_key.pub + roles: + - setup