Provide a default when stdinpass variable is not set (#209)

This commit is contained in:
Nikolay Edigaryev 2025-02-12 02:12:06 +04:00 committed by GitHub
parent 998bbf8ca8
commit e134909aa8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@
# otherwise on the OS update the "softwareupdate" will be stuck at "Downloaded: macOS [...]"
- name: install available update
command:
cmd: "softwareupdate --install --agree-to-license --force --restart --user admin --stdinpass {{ stdinpass }} '{{ item.label }}'"
cmd: "softwareupdate --install --agree-to-license --force --restart --user admin --stdinpass {{ stdinpass | default("") }} '{{ item.label }}'"
stdin: "{{ ansible_password }}"
register: update_result
# Work around the following: