ansible / lightbulb

Lightbulb has been deprecated and replaced by Ansible Workshops
https://ansible.github.io/workshops/
MIT License
480 stars 310 forks source link

ssh_port default missing in few places #294

Closed ikke-t closed 6 years ago

ikke-t commented 6 years ago

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 6 years ago

Fixed by PR.