ssh_port default missing in few places
ikke-t opened this issue · 1 comments
ikke-t commented
Hi,
the aws provisioner fails due missing definition for ssh_port:
TASK [manage_ec2_instances : Add hosts to control_nodes group] ****************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ssh_port' is undefined\n\nThe error appears to have been in '/srv/ansible-lightbulb/tools/aws_lab_setup/roles/manage_ec2_instances/tasks/create.yml': line 9, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Add hosts to control_nodes group\n ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'ssh_port' is undefined"}
there are these places which should have default set like {{ ssh_port | default('22') }}
:
# grep -r ssh_port roles/
roles/manage_ec2_instances/tasks/create.yml: ansible_port: "{{ ssh_port }}"
roles/manage_ec2_instances/tasks/create.yml: ansible_port: "{{ ssh_port }}"
roles/common/handlers/main.yml: port: "{{ ssh_port }}"
ikke-t commented
Fixed by PR.