chocolatey / chocolatey-ansible

The Chocolatey module collection for Ansible
GNU General Public License v3.0
49 stars 30 forks source link

Not able to use chocolatey.chocolatey.win_chocolatey in AWX on CentOS8 - K3S #149

Closed narendermann closed 2 months ago

narendermann commented 4 months ago

Checklist

What You Are Seeing?

SSH password: BECOME password[defaults to SSH password]: ERROR! couldn't resolve module/action 'win_chocolatey'. This often indicates a misspelling, missing collection, or incorrect module path. The error appears to be in '/runner/project/windows/install_uninstall_with_chocolatey.yml': line 13, column 6, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be:

Install/uninstall with chocolatey

What is Expected?

module/action 'win_chocolatey' should work

How Did You Get This To Happen?

ran the ansible template in AWX tower and got this error.

System Details

Installed Packages

not able to run choco list

Output Log

SSH password: 
BECOME password[defaults to SSH password]: 
ERROR! couldn't resolve module/action 'win_chocolatey'. This often indicates a misspelling, missing collection, or incorrect module path.
The error appears to be in '/runner/project/windows/install_uninstall_with_chocolatey.yml': line 13, column 6, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
  # Install/uninstall with chocolatey
   - name: Ensure 7-Zip is installed through Chocolatey
     ^ here

Additional Context

No response

vexx32 commented 3 months ago

Are you referencing the module with win_chocolatey or the fully qualified name chocolatey.chocolatey.win_chocolatey? IIRC some version of Ansible will correctly infer the former, but certain versions may not.

You also need to ensure that the module is correctly installed from galaxy, as well.

narendermann commented 3 months ago

Hello @vexx32 - Thank you for the response on this. I actually tried both. tried chocolatey.chocolatey.win_chocolatey and win_chocolatey both.

Also tried referencing the chocolatey.chocolatey collection in the playbooks as well.

ALso tried installing chocolatey.chocolatey module in the awx-operator-controller-manager as well with " ansible-galaxy collection install chocolatey.chocolatey" commands.

Still my AWX is not picking up the chocolatey.chocolatey collection/module.

I do not now wheather its due to the execution environment image or anything else?

narendermann commented 3 months ago

ERROR! couldn't resolve module/action 'win_chocolatey'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/runner/project/windows/install_uninstall_with_chocolatey.yml': line 15, column 6, but may

be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

github-actions[bot] commented 2 months ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue will be closed in 14 days if it continues to be inactive.

github-actions[bot] commented 2 months ago

Dear contributor,

As this issue seems to have been inactive for quite some time now, it has been automatically closed. If you feel this is a valid issue, please feel free to re-open the issue if / when a pull request has been added. Thank you for your contribution.