ansible / vscode-ansible

vscode/vscodium extension for providing Ansible auto-completion and integrating quality assurance tools like ansible-lint, ansible syntax check, yamllint, molecule and ansible-test.
https://ansible.readthedocs.io/projects/vscode-ansible/
MIT License
361 stars 87 forks source link

Cannot configure Execution Environments #860

Closed cidrbl0ck closed 1 year ago

cidrbl0ck commented 1 year ago

Problem

Using VSCode3 on MacOS remoting to an Ubuntu 22.04 dev host, the error message:

[Error - 2:24:20 PM] ExecutionEnvironment service not correctly initialized.

Checking the Output - Ansible Support:

[Error - 2:24:20 PM] ExecutionEnvironment service not correctly initialized.
[Error - 2:24:20 PM] ExecutionEnvironment service not correctly initialized.
Error: error inspecting object: no such object: "hub.domain.net/winrm_image:latest"
Error: Command failed: podman inspect --format='{{json .Config}}' hub.domain.net/winrm_image:latest
Error: error inspecting object: no such object: "hub.domain.net/winrm_image:latest"

    at checkExecSyncError (node:child_process:828:11)
    at Object.execSync (node:child_process:902:15)
    at /home/ansible/.vscode-server/extensions/redhat.ansible-2.0.58/out/server/src/server.js:2:121696
    at Generator.next (<anonymous>)
    at s (/home/ansible/.vscode-server/extensions/redhat.ansible-2.0.58/out/server/src/server.js:2:118981) {
  status: 125,
  signal: null,
  output: [
    null,
    '',
    'Error: error inspecting object: no such object: "hub.domain.net/winrm_image:latest"\n'
  ],
  pid: 164205,
  stdout: '',
  stderr: 'Error: error inspecting object: no such object: "hub.domain.net/winrm_image:latest"\n'

Settings.py

{ "ansible.ansible.path": "/home/ansible/.local/bin/ansible", "ansible.ansible.reuseTerminal": true, "ansible.ansibleNavigator.path": "/home/ansible/.local/bin/ansible-navigator", "ansible.executionEnvironment.enabled": true, "ansible.executionEnvironment.image": "hub.domain.net/winrm_image:latest", "ansible.lightspeed.enabled": true, "ansible.lightspeed.suggestions.enabled": true, "ansible.python.interpreterPath": "/usr/bin/python3", "ansible.validation.lint.path": "/home/ansible/.local/bin/ansible-lint", "python.defaultInterpreterPath": "/usr/bin/python" }

In the terminal I can run:

podman pull hub.domain.net/winrm_image:latest. successfully podman images shows the image I want

However my Private Automation Hub requires a login, much like quay and registry. I have not found settings to cover that so maybes that' the problem?

Solution

The extension correctly pulls the image or if not missing, uses the one specified.

Alternatives

No response

Additional context

No response

priyamsahoo commented 1 year ago

We only support official EE for the use case. Could you please try out with an official one and confirm the behavior?