mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
homebrew: Honor update_homebrew value (#112)
Added environment variable to honor update_homebrew argument specified by user. Fixes: ansible/ansible#56650 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
e33893869a
commit
645fe91fa3
3 changed files with 6 additions and 8 deletions
2
changelogs/fragments/56650-homebrew-update_brew.yml
Normal file
2
changelogs/fragments/56650-homebrew-update_brew.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- homebrew - Added environment variable to honor update_homebrew setting (https://github.com/ansible/ansible/issues/56650).
|
|
@ -941,6 +941,10 @@ def main():
|
|||
state = 'absent'
|
||||
|
||||
update_homebrew = p['update_homebrew']
|
||||
if not update_homebrew:
|
||||
module.run_command_environ_update.update(
|
||||
dict(HOMEBREW_NO_AUTO_UPDATE="True")
|
||||
)
|
||||
upgrade_all = p['upgrade_all']
|
||||
p['install_options'] = p['install_options'] or []
|
||||
install_options = ['--{0}'.format(install_option)
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: xz_result
|
||||
environment:
|
||||
HOMEBREW_NO_AUTO_UPDATE: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
|
@ -50,8 +48,6 @@
|
|||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: xz_result
|
||||
environment:
|
||||
HOMEBREW_NO_AUTO_UPDATE: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
|
@ -65,8 +61,6 @@
|
|||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: xz_result
|
||||
environment:
|
||||
HOMEBREW_NO_AUTO_UPDATE: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
|
@ -80,8 +74,6 @@
|
|||
become: yes
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
||||
register: xz_result
|
||||
environment:
|
||||
HOMEBREW_NO_AUTO_UPDATE: True
|
||||
|
||||
- assert:
|
||||
that:
|
||||
|
|
Loading…
Reference in a new issue