Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public IP Attribute Error when running build-base.sh #8

Open
ajaychan opened this issue Jul 13, 2019 · 3 comments
Open

Public IP Attribute Error when running build-base.sh #8

ajaychan opened this issue Jul 13, 2019 · 3 comments

Comments

@ajaychan
Copy link

[root@ip-172-31-33-196 ec2]# ./build-base.sh
[DEPRECATION WARNING]: The TRANSFORM_INVALID_GROUP_CHARS settings is set to allow bad characters in group names by default, this will change, but still be user
configurable on deprecation. This feature will be removed in version 2.10. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details

PLAY [Launch EC2 instance] ***********************************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************************************
ok: [localhost]

TASK [launch : Launch EC2 instance(s)] ***********************************************************************************************************************************
changed: [localhost]

TASK [launch : Add new instance to host group] ***************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'public_ip'\n\nThe error appears to be in '/opt/faas/ec2/roles/launch/tasks/main.yml': line 32, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n # Add to host group so we can see this node later in the playbook.\n- name: Add new instance to host group\n ^ here\n"}

NO MORE HOSTS LEFT *******************************************************************************************************************************************************

PLAY RECAP ***************************************************************************************************************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

@dbstephan
Copy link

This seems to be trouble with newer versions of ansible.
I used a recommended patch for with_items and it now runs (at least up to the next hickup).
change:
in roles/launch/tasks/main.yml: with_items: ec2_output.tagged_instances -> with_items: "{{ ec2_output.tagged_instances }}"

@lilyanatia
Copy link

This seems to be trouble with newer versions of ansible.
I used a recommended patch for with_items and it now runs (at least up to the next hickup).
change:
in roles/launch/tasks/main.yml: with_items: ec2_output.tagged_instances -> with_items: "{{ ec2_output.tagged_instances }}"

that got me past that error, but now I'm getting this:

TASK [Create AMI from temporary instance] **************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an unde
fined variable. The error was: 'dict object' has no attribute 'tag_Name_faas_ami
_builder'\n\nThe error appears to be in '/home/hotaru/faas/ec2/build-finish.yml'
: line 17, column 7, but may\nbe elsewhere in the file depending on the exact sy
ntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Create AMI f
rom temporary instance\n      ^ here\n"}

@thornado123
Copy link

This seems to be trouble with newer versions of ansible.
I used a recommended patch for with_items and it now runs (at least up to the next hickup).
change:
in roles/launch/tasks/main.yml: with_items: ec2_output.tagged_instances -> with_items: "{{ ec2_output.tagged_instances }}"

that got me past that error, but now I'm getting this:

TASK [Create AMI from temporary instance] **************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an unde
fined variable. The error was: 'dict object' has no attribute 'tag_Name_faas_ami
_builder'\n\nThe error appears to be in '/home/hotaru/faas/ec2/build-finish.yml'
: line 17, column 7, but may\nbe elsewhere in the file depending on the exact sy
ntax problem.\n\nThe offending line appears to be:\n\n\n    - name: Create AMI f
rom temporary instance\n      ^ here\n"}

I got to the same point as you. Did you ever get beyond this error?
Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants