Open UNiXMIT opened 1 year ago
Files identified in the description:
plugins/modules/ec2_instance.py
](https://github.com/['ansible-collections/amazon.aws', 'ansible-collections/community.aws', 'ansible-collections/community.vmware']/blob/main/plugins/modules/ec2_instance.py)If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @jillr @ryansb @s-hertel @tremble click here for bot help
I've checked the EC2 instance that was created and it seems that it's only listening on port 5985 now. Previously it worked on port 5986. Has the WinRM setup script changed in the past day?
Yup, something changed upstream on the 11th.... https://github.com/ansible/ansible/pull/81011
@UNiXMIT If you have a support contract with Red Hat for Ansible Automation Platform I'd strongly recommend opening a case there to get the attention of the Product folks. As part of amazon.aws this would be covered by your support contracts.
The trouble is that the script URL that was hard coded (https://github.com/ansible-collections/amazon.aws/blob/main/plugins/module_utils/tower.py) now points to a file which has been deleted...
@tremble Hopefully they will change the URL to point to the new one - https://github.com/ansible/ansible-documentation/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 I'm not using AAP. I use aap_callback to set the admin password and enable WinRM.
I've got it working again. I ditched aap_callback and now use user_data:
user_data: |
<powershell>
net user administrator {{ myPassword }}
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/ansible/ansible-documentation/devel/examples/scrConfigureRemotingForAnsible.ps1'))
</powershell>
@UNiXMIT,
Glad you've got something working. With the password in the user_data I'd strongly recommend using no_log: True
on that task to avoid accidentally logging your Admin passwords in plain text. https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#keep-secret-data
I've poked a couple of folks behind the scenes as I'm not sure pointing to ansible-docs is the right solution either.
@tremble Yeah good point. I have no_log set elsewhere so I'll use it here too. Thanks
Summary
Yesterday (11th July 2023) my Ansible scripts were working OK. They use aap_callback to enable WinRM. The my script waits for port 5986 to become available using ansible.builtin.wait_for. Worked fine for months. Today (approx. lunchtime) it stopped working and my EC2 instances are no longer working with WinRM on port 5986. After my ansible script fails I try to telnet 5986 and sure enough it's not open. I can't understand what's changed.
Issue Type
Bug Report
Component Name
ec2_instance
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
cat /etc/os-release NAME="Red Hat Enterprise Linux" VERSION="9.0 (Plow)" ID="rhel" ID_LIKE="fedora" VERSION_ID="9.0" PLATFORM_ID="platform:el9" PRETTY_NAME="Red Hat Enterprise Linux 9.0 (Plow)" ANSI_COLOR="0;31" LOGO="fedora-logo-icon" CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos" HOME_URL="https://www.redhat.com/" DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/9/" BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9" REDHAT_BUGZILLA_PRODUCT_VERSION=9.0 REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux" REDHAT_SUPPORT_PRODUCT_VERSION="9.0"
Steps to Reproduce
Expected Results
Previously, before today, 'ansible.builtin.wait_for' would wait for port 5986 to become available and then the play would continue on successfully once it was available.
Actual Results
Code of Conduct