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

Ansible 2.5 demo Windows playbooks #205

Open
adb101-1 opened this issue Dec 5, 2024 · 5 comments
Open

Ansible 2.5 demo Windows playbooks #205

adb101-1 opened this issue Dec 5, 2024 · 5 comments

Comments

@adb101-1
Copy link

adb101-1 commented Dec 5, 2024

WINDOWS / Test Connectivity job works:
`Identity added: /runner/artifacts/61/ssh_key_data (root@083b6ddd01f9)
[DEPRECATION WARNING]: ANSIBLE_COLLECTIONS_PATHS option, does not fit var
naming standard, use the singular form ANSIBLE_COLLECTIONS_PATH instead. This
feature will be removed from ansible-core in version 2.19. Deprecation warnings
can be disabled by setting deprecation_warnings=False in ansible.cfg.
SSH password:

PLAY [Connectivity test] *******************************************************

TASK [Wait 600 seconds for target connection to become reachable/usable] *******
ok: [aws_win1]
ok: [aws_dc]

TASK [Ping the windows host] ***************************************************
ok: [aws_dc]
ok: [aws_win1]

PLAY RECAP *********************************************************************
aws_dc : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
aws_win1 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 `

But other Windows jobs fail:

`Identity added: /runner/artifacts/58/ssh_key_data (root@083b6ddd01f9)
[DEPRECATION WARNING]: ANSIBLE_COLLECTIONS_PATHS option, does not fit var
naming standard, use the singular form ANSIBLE_COLLECTIONS_PATH instead. This
feature will be removed from ansible-core in version 2.19. Deprecation warnings
can be disabled by setting deprecation_warnings=False in ansible.cfg.
SSH password:

PLAY [PowerShell Script] *******************************************************

TASK [Copy script to remote] ***************************************************
fatal: [aws_dc]: UNREACHABLE! => {"changed": false, "msg": "ntlm: module 'inspect' has no attribute 'getargspec'", "unreachable": true}
fatal: [aws_win1]: UNREACHABLE! => {"changed": false, "msg": "ntlm: module 'inspect' has no attribute 'getargspec'", "unreachable": true}

PLAY RECAP *********************************************************************
aws_dc : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
aws_win1 : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0 `

@zjleblanc
Copy link
Contributor

I believe we are looking at two issues here:

  1. pywinrm has a fix in 0.4.3 to make it compatible with python3.11 - the EE has pywinrm==0.4.1 (refer to kerberos: module 'inspect' has no attribute 'getargspec' ansible#81530 (comment))
  2. the group vars are not being applied to the host - leading to use ntlm instead of credssp

@willtome
Copy link
Collaborator

ntlm looks like the right protocol per the group vars
https://github.com/ansible/product-demos/blob/main/windows/group_vars/os_windows.yml

@zjleblanc
Copy link
Contributor

Oh wow, I must have been looking at one of my other AWS inventories. That's good to know though. Building a new EE and will test upgrading pywinrm.

@zjleblanc
Copy link
Contributor

@willtome found the culprit of my confusion:

ansible_winrm_transport: credssp

I will move the os_windows group_vars definition to the config-as-code to consolidate.

@sdunne
Copy link

sdunne commented Dec 13, 2024

If it helps, when I try to do a win_ping command from Inventory | Demo Inventory | Hosts against a Win host I get

unreachable: true
msg: 'credssp: module ''inspect'' has no attribute ''getargspec'''
changed: false"

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