Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use noninteractive mode and update sha to latest master install version #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iloveitaly
Copy link

No description provided.

tasks/main.yml Outdated
@@ -17,7 +17,7 @@
stat:
path: "{{ linuxbrew_prefix_user }}/bin/brew"
register: linuxbrew_user_st
become: false
become: true
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this change should be included, but it was required for me

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this doesn't make sense. linuxbrew_prefix_user is gathered based on the SSH user (e.g., "ubuntu"). So it makes sense to check for the existence of that path with the same user (e.g., "ubuntu").

Copy link
Owner

@markosamuli markosamuli Jan 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is checking if the installation exists in the current user home, so is purposedly set to false.

vars/main.yml Outdated
Comment on lines 15 to 16
linuxbrew_install_url: "https://raw.githubusercontent.com/Homebrew/install/master/install.sh"
linuxbrew_install_checksum: "sha256:45c12bcd7765986674142230fc0860f5274903adbe37d582e5537771a1bae0b8"
linuxbrew_install_checksum: "sha256:dff8f0c0ecf3f9bd288385e0750a74f25d0c540078f4c4382492c8d0337a45f9"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it makes sense to check for the checksum with a link to a file that keeps changing.

Either we use that generic URL and don't check the checksum, or we use an URL like this:

linuxbrew_install_url: "https://raw.githubusercontent.com/Homebrew/install/bcc0e9c0ac3fa957d711c6b8e05060940a47b162/install.sh"
linuxbrew_install_checksum: "sha256:41d5eb515a76b43e192259fde18e6cd683ea8b6a3d7873bcfc5065ab5b12235c"

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the default checksum and checking it only if defined might be more convenient.

One could still override the URL and add checksum if they needed the added security.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed checksum in #12

@@ -15,7 +15,7 @@
become: false

- name: Install Linuxbrew
command: sh -c "{{ linuxbrew_install_tmp }}/install.sh"
command: sh -c "NONINTERACTIVE=1 {{ linuxbrew_install_tmp }}/install.sh"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this fixed my problem.

@iloveitaly
Copy link
Author

@huyz want to submit changes/GH suggestions for some of the comments? Then I can merge them into the branch.

@huyz
Copy link

huyz commented Jan 15, 2023

Until @markosamuli shows that he's got time to merge in all the PRs and make a new release, I'm just going to work on my own fork, cleaning up a lot of different issues. For example, I don't want to favor pinning the installer script (as could be misinterpreted above); I'm giving users a choice of also just using a generic URL and not doing a checksum.

@markosamuli
Copy link
Owner

I've removed checksum from the role in #12

@markosamuli
Copy link
Owner

@iloveitaly I've refactored the role a bit in release v2 so these changes need some updates. If you rebase against the master you should get the test Docker images as well.

@huyz
Copy link

huyz commented Jul 28, 2023

@markosamuli Thanks for the update. I just had a chance to re-use this role. The other part from this PR that's still needed is to pass NONINTERACTIVE=1 as in https://github.com/iloveitaly/ansible-linuxbrew/blob/noninteractive/tasks/install_with_installer.yml#L18

@iloveitaly
Copy link
Author

updated branch to just make the NONINTERACTIVE=1 change!

@iloveitaly
Copy link
Author

@huyz friendly reminder here!

@huyz
Copy link

huyz commented Sep 15, 2023

@iloveitaly Did you mean to ping @markosamuli ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants