Skip to content

Add support for a required proxy on install target system. #43

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

Open
wants to merge 4 commits into
base: config_update
Choose a base branch
from

Conversation

william-stearns
Copy link
Contributor

Update install_pre.yml to add support for installing to a system that requires the use of a proxy. Note that there are no changes needed for install_post.yml .

@william-stearns
Copy link
Contributor Author

Note: commit 490c554 has not been tested.

@william-stearns
Copy link
Contributor Author

As a side note, I've written the text that will go in the user guide to support these commits. I'm pasting that text below for your reference (but not asking you to take responsibility for putting it in the guide.)

        If the systems to which you're installing AC-Hunter can only
reach the Internet through a proxy you'll have to tell ansible how to
use it.  Before running the installer, run the following commands on the
system from which you run the installer.

        If your proxy is located on the host system on which AC-Hunter
will be run, run the following 2 commands, substituting the proxy port
for 3128, then run ./install_achunter.sh as normal:

export ans_http_proxy='http://172.17.0.1:3128'
export ans_https_proxy='http://172.17.0.1:3128'
#Now run ./install_achunter.sh achunter_hostname

        If your proxy is located on some other system run the following
(substituting that system's hostname or IP for myproxyhost and the port
number for 3128).  Make sure the AC-Hunter system can reach the proxy.

export ans_http_proxy='http://myproxyip:3128'
export ans_https_proxy='http://myproxyip:3128'
#Now run ./install_achunter.sh achunter_hostname

        If your proxy requires a username and password for access AND
you're on a Debian or Ubuntu system, you can place those after the two
forward slashes like this:
export ans_http_proxy='http://the_username:[email protected]:3128'
export ans_https_proxy='http://the_username:[email protected]:3128'
        or
export ans_http_proxy='http://the_username:the_password@myproxyip:3128'
export ans_https_proxy='http://the_username:the_password@myproxyip:3128'

        If your proxy requires a username and password for access AND
you're on an rpm-based system, you will need to add the following two
lines to /etc/dnf/dnf.conf on the AC-Hunter system by hand before
running the two export commands and running the install:
proxy_username=the_username
proxy_password=the_password

        These changes support apt (and equivalent tools like apt-get) on
Ubuntu and Debian.  They also support Alma Linux, Centos, RedHat
Enterprise, Oracle, and Rocky 8 and above.  They also support Fedora 22
and above.  Note that only the most recent versions of Rocky, Centos,
and Ubuntu have been tested.

@0x6d6f7468 0x6d6f7468 changed the base branch from main to config_update May 12, 2025 17:43
@0x6d6f7468
Copy link

0x6d6f7468 commented May 12, 2025

Note: commit 490c554 has not been tested.

Is there a reason why this commit hasn't been tested? Just curious, and making sure the PR is ready to review. Thanks!

@william-stearns
Copy link
Contributor Author

Note: commit 490c554 has not been tested.

Is there a reason why this commit hasn't been tested? Just curious, and making sure the PR is ready to review. Thanks!

My apologies - I forgot that the testing for the rpm/dnf commit had not been done. I'll test it now. (Note, the apt side was already tested.)

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