Skip to content

vmware_guest_sendkey, it doesnt work when run from semaphore ci cd #2386

Open
@sairamobili

Description

@sairamobili
SUMMARY

vmware_guest_sendkey works correctly when executed from the CLI , but fails silently when executed via CI/CD pipeline (Semaphore). The task reports success and returns returned_keys_send_number = 1, but the VM does not receive the keystroke (e.g., ENTER) and remains stuck at the boot screen.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.vmware.vmware_guest_sendkey

ANSIBLE VERSION
ansible [core 2.18.1]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/semaphore/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/semaphore/apps/ansible/11.1.0/venv/lib/python3.11/site-packages/ansible
  ansible collection location = /home/semaphore/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/semaphore/apps/ansible/11.1.0/venv/bin/ansible
  python version = 3.11.11 (main, Dec  6 2024, 11:15:21) [GCC 13.2.1 20231014]
  jinja version = 3.1.5
  libyaml = True
COLLECTION VERSION
community.vmware        5.5.0

CONFIGURATION
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
DEFAULT_CALLBACK_WHITELIST(/etc/ansible/ansible.cfg) = ['timer', 'yaml']
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 10
OS / ENVIRONMENT

CI/CD runner (Semaphore) running on Ubuntu container
vCenter 7.0.3
Target VM: Windows Server 2022 template
No VMRC or Web Console session active during run

STEPS TO REPRODUCE
- name: Send list of keys to virtual machine
  community.vmware.vmware_guest_sendkey:
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    cluster: "{{ cluster }}"
    validate_certs: false
    name: "{{ name }}"
    keys_send:
      - ENTER
  delegate_to: localhost
  1. Run task via CLI – works.
  2. Run same task in CI pipeline – keys are reported as sent, but have no effect.
EXPECTED RESULTS

Keystrokes should be received by the VM and the boot process should continue.

ACTUAL RESULTS

Task returns success:

"sendkey_info": {
  "keys_send": ["ENTER"],
  "keys_send_number": 1,
  "returned_keys_send_number": 1,
  "virtual_machine": "W2K22-STD-Template"
}

However, VM does not register the keystroke and remains at the boot screen. There is no indication of failure in the Ansible task output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions