1
0
Fork 0
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:
Abhijeet Kasurde 2020-04-05 13:53:56 +05:30 committed by GitHub
parent e33893869a
commit 645fe91fa3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 8 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- homebrew - Added environment variable to honor update_homebrew setting (https://github.com/ansible/ansible/issues/56650).

View file

@ -941,6 +941,10 @@ def main():
state = 'absent' state = 'absent'
update_homebrew = p['update_homebrew'] 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'] upgrade_all = p['upgrade_all']
p['install_options'] = p['install_options'] or [] p['install_options'] = p['install_options'] or []
install_options = ['--{0}'.format(install_option) install_options = ['--{0}'.format(install_option)

View file

@ -35,8 +35,6 @@
become: yes become: yes
become_user: "{{ brew_stat.stat.pw_name }}" become_user: "{{ brew_stat.stat.pw_name }}"
register: xz_result register: xz_result
environment:
HOMEBREW_NO_AUTO_UPDATE: True
- assert: - assert:
that: that:
@ -50,8 +48,6 @@
become: yes become: yes
become_user: "{{ brew_stat.stat.pw_name }}" become_user: "{{ brew_stat.stat.pw_name }}"
register: xz_result register: xz_result
environment:
HOMEBREW_NO_AUTO_UPDATE: True
- assert: - assert:
that: that:
@ -65,8 +61,6 @@
become: yes become: yes
become_user: "{{ brew_stat.stat.pw_name }}" become_user: "{{ brew_stat.stat.pw_name }}"
register: xz_result register: xz_result
environment:
HOMEBREW_NO_AUTO_UPDATE: True
- assert: - assert:
that: that:
@ -80,8 +74,6 @@
become: yes become: yes
become_user: "{{ brew_stat.stat.pw_name }}" become_user: "{{ brew_stat.stat.pw_name }}"
register: xz_result register: xz_result
environment:
HOMEBREW_NO_AUTO_UPDATE: True
- assert: - assert:
that: that: