ansible / lightbulb

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

provision_lab.yml playbook fails #292

Closed thisdwhitley closed 6 years ago

thisdwhitley commented 6 years ago

I think this is due to the fact that lightbulb/tools/aws_lab_setup/inventory/global_vars/all.yml is no longer read and therefore ssh_port is not defined. Here is the error:

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 '/home/dwhitley/GIT/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"}

This is potentially due to a change in ec59cbaa96ace8135ed59f4936676e8ccf03aa0e because if I change ansible.cfg from:

inventory      = ./inventory.ini

to

inventory      = ./inventory

the provision_lab playbook completes as expected. The inventory directory is potentially historical, I'm not sure the other variables in lightbulb/tools/aws_lab_setup/inventory/group_vars/all.yml are ever used.

Perhaps the ssh_port variable declaration could be moved to another location?

thisdwhitley commented 6 years ago

This concern was addressed in https://github.com/ansible/lightbulb/pull/295 so this issue is no longer relevant.