Uploaded image for project: 'Ansible Cloud Automation'
  1. Ansible Cloud Automation
  2. ACA-1983

[community.aws/958] ssm connection plugin starts ansible.windows.win_command / ansible.windows.win_shell

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      https://github.com/ansible-collections/community.aws/issues/958

          1. Summary

      I see errors, when using ansible.windows.win_command / win_shell with the ssm connection plugin.

      It seems, as if the win_command is executed in end endless loop while win_shell runs at least twice (I use it to execute a ps1 script)

      The shellscript I run with win_shell or win_command extracts a zip file placed in the same directory as the ps1 script, works on the data and deletes it afterwards.

      I get the error message, the there is no zip file next to the ps1 script (error is written by the script)

      but looking on the instance while the win_shell / win_command is executed, I can see that the zipfile is executed and there are successfull runs (but even others). The win_shell / win_command never finishes.

      I don't get the error when using winrm connection

      Maybe it has something to do with the

      export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

      I have to do in order to make the ssm plugin running?

          1. Issue Type

      Bug Report

          1. Component Name

      ssm connect plugin

          1. Ansible Version

      ```console (paste below)
      ansible [core 2.12.2]
      config file = None
      configured module search path = ['/Users/.../.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
      ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
      ansible collection location = /Users/.../.ansible/collections:/usr/share/ansible/collections
      executable location = /usr/local/bin/ansible
      python version = 3.9.10 (main, Jan 15 2022, 11:48:04) [Clang 13.0.0 (clang-1300.0.29.3)]
      jinja version = 2.11.3
      libyaml = True
      ```

          1. Collection Versions

      ```console (paste below)
      Collection Version
      ----------------------------- -------
      amazon.aws 2.1.0
      ansible.netcommon 2.5.0
      ansible.posix 1.3.0
      ansible.utils 2.4.3
      ansible.windows 1.9.0
      arista.eos 3.1.0
      awx.awx 19.4.0
      azure.azcollection 1.11.0
      check_point.mgmt 2.2.2
      chocolatey.chocolatey 1.1.0
      cisco.aci 2.1.0
      cisco.asa 2.1.0
      cisco.intersight 1.0.18
      cisco.ios 2.6.0
      cisco.iosxr 2.6.0
      cisco.ise 1.2.1
      cisco.meraki 2.6.0
      cisco.mso 1.3.0
      cisco.nso 1.0.3
      cisco.nxos 2.8.2
      cisco.ucs 1.6.0
      cloud.common 2.1.0
      cloudscale_ch.cloud 2.2.0
      community.aws 2.2.0
      community.azure 1.1.0
      community.ciscosmb 1.0.4
      community.crypto 2.2.0
      community.digitalocean 1.15.0
      community.dns 2.0.6
      community.docker 2.1.1
      community.fortios 1.0.0
      community.general 4.4.0
      community.google 1.0.0
      community.grafana 1.3.0
      community.hashi_vault 2.2.0
      community.hrobot 1.2.2
      community.kubernetes 2.0.1
      community.kubevirt 1.0.0
      community.libvirt 1.0.2
      community.mongodb 1.3.2
      community.mysql 2.3.3
      community.network 3.0.0
      community.okd 2.1.0
      community.postgresql 1.6.1
      community.proxysql 1.3.1
      community.rabbitmq 1.1.0
      community.routeros 2.0.0
      community.skydive 1.0.0
      community.sops 1.2.0
      community.vmware 1.17.1
      community.windows 1.9.0
      community.zabbix 1.5.1
      containers.podman 1.9.1
      cyberark.conjur 1.1.0
      cyberark.pas 1.0.13
      dellemc.enterprise_sonic 1.1.0
      dellemc.openmanage 4.4.0
      dellemc.os10 1.1.1
      dellemc.os6 1.0.7
      dellemc.os9 1.0.4
      f5networks.f5_modules 1.14.0
      fortinet.fortimanager 2.1.4
      fortinet.fortios 2.1.3
      frr.frr 1.0.3
      gluster.gluster 1.0.2
      google.cloud 1.0.2
      hetzner.hcloud 1.6.0
      hpe.nimble 1.1.4
      ibm.qradar 1.0.3
      infinidat.infinibox 1.3.3
      infoblox.nios_modules 1.2.1
      inspur.sm 1.3.0
      junipernetworks.junos 2.8.0
      kubernetes.core 2.2.3
      mellanox.onyx 1.0.0
      netapp.aws 21.7.0
      netapp.azure 21.10.0
      netapp.cloudmanager 21.13.0
      netapp.elementsw 21.7.0
      netapp.ontap 21.15.1
      netapp.storagegrid 21.9.0
      netapp.um_info 21.8.0
      netapp_eseries.santricity 1.2.13
      netbox.netbox 3.5.1
      ngine_io.cloudstack 2.2.2
      ngine_io.exoscale 1.0.0
      ngine_io.vultr 1.1.0
      openstack.cloud 1.6.0
      openvswitch.openvswitch 2.1.0
      ovirt.ovirt 1.6.6
      purestorage.flasharray 1.12.1
      purestorage.flashblade 1.9.0
      sensu.sensu_go 1.13.0
      servicenow.servicenow 1.0.6
      splunk.es 1.0.2
      t_systems_mms.icinga_director 1.27.0
      theforeman.foreman 2.2.0
      vyos.vyos 2.6.0
      wti.remote 1.0.3
      ```

          1. AWS SDK versions

      ```console (paste below)
      Name: boto
      Version: 2.49.0
      Summary: Amazon Web Services Library
      Home-page: https://github.com/boto/boto/
      Author: Mitch Garnaat
      Author-email: mitch@garnaat.com
      License: MIT
      Location: /Users/../Library/Python/3.9/lib/python/site-packages
      Requires:
      Required-by:

      Name: boto3
      Version: 1.21.1
      Summary: The AWS SDK for Python
      Home-page: https://github.com/boto/boto3
      Author: Amazon Web Services
      Author-email:
      License: Apache License 2.0
      Location: /usr/local/lib/python3.9/site-packages
      Requires: botocore, jmespath, s3transfer
      Required-by: aws-sam-translator, cloudformation-cli, eks-rolling-update

      Name: botocore
      Version: 1.24.1
      Summary: Low-level, data-driven core of boto 3.
      Home-page: https://github.com/boto/botocore
      Author: Amazon Web Services
      Author-email:
      License: Apache License 2.0
      Location: /usr/local/lib/python3.9/site-packages
      Requires: jmespath, python-dateutil, urllib3
      Required-by: boto3, git-remote-codecommit, s3transfer
      ```

          1. Configuration

      ```console (paste below)
      nothing...

      ```

          1. OS / Environment

      Target Win Server 2019,

      Executed on Mac

          1. Steps to Reproduce

      <!--- Paste example playbooks or commands between quotes below -->
      ```yaml (paste below)
      use winshell to execute a ps1 script on a windows machine connected via ssm
      ```

          1. Expected Results

      win_shell shoud run like it does with winrm

          1. Actual Results

      ```console (paste below)

      ```

          1. Code of Conduct
      • [X] I agree to follow the Ansible Code of Conduct

              Unassigned Unassigned
              jrouleau Jill Rouleau
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: