nuagenetworks / nuage-metroae

Nuage Networks Metro Automation Engine
http://devops.nuagenetworks.net
Apache License 2.0
44 stars 17 forks source link

vsd deploy uses wron remote user in 'Add SSH keys to authorized_keys file' #337

Closed marcowenwolf closed 7 years ago

marcowenwolf commented 7 years ago

In Nuage_Metro_2.2.0/roles/vsd-deploy/tasks/non_heat.yml:

    - name: Add SSH keys to authorized_keys file
      shell: "echo {{ item[1].stdout }} >> /root/.ssh/authorized_keys"
      delegate_to: "{{ item[0] }}"
      with_nested:
        - "{{ groups['vsds'] }}"
        - "{{ ssh_key_lst.results }}"
      run_once: true
      remote_user: "{{ target_server_username }}"
    when: vsd_version.stdout | int < 5

I think the 'remote_user' line should be:

remote_user: root

The target_server_username is pointing to the hypervisor if correct.

ghost commented 7 years ago

Good catch. Also one other line in that file was wrong. Fixed in https://github.com/nuagenetworks/nuage-metro/commit/4f59c7c9a277afd19672550f448571c76069890d in dev branch.