Become sudo hangs on first sudo on OSX

11 views
Skip to first unread message

张北

unread,
Mar 17, 2023, 5:38:09 AM3/17/23
to Ansible Project

Hi, ansible community! I have encountered an issue where if sudo -i has not been executed in the current command line session before, the become:true portion in Ansible will get stuck.

```

- hosts: localhost
  connection: local
  gather_facts: true

  tasks:
    - name: "verify become is not stuck"
      ansible.builtin.command: "echo ok"

```

Has anyone else encountered the same issue? Or is this a known problem?

My envirement info:

```

ansible [core 2.14.3]
  config file = None
  configured module search path = ['/Users/meta/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/ansible
  ansible collection location = /Users/meta/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.11.2 (main, Feb 16 2023, 02:55:59) [Clang 14.0.0 (clang-1400.0.29.202)] (/opt/homebrew/Cellar/ansible/7.3.0/libexec/bin/python3.11)
  jinja version = 3.1.2
  libyaml = True

```

Reply all
Reply to author
Forward
0 new messages