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

FEATURE: Allow disconnected install #222

Open
RonnyMaas opened this issue Jun 24, 2020 · 0 comments
Open

FEATURE: Allow disconnected install #222

RonnyMaas opened this issue Jun 24, 2020 · 0 comments

Comments

@RonnyMaas
Copy link

RonnyMaas commented Jun 24, 2020

I would like to use this role disconnected (so without internet acces).
At the moment epel is always installed by this role en mongodb repos are hardcoded in vars file for multiple versions. Play will fail when trying to install because of this in my situation. I did manage to create a workaround for this but it would be nicer if repo urls would be configurable by vars with internet defaults.

Because mongodb version is already a var. This var can also be used for creating the the correct repo url instead of a var for all versions I think. But for now I also included all vars in my workaround

My workaround:

tasks:
  - name: "Add YUM repos [epel-release]"
     yum_repository:
       name: epel-source
       description: "Extra Packages for Enterprise Linux 7 - $basearch - Source"
       baseurl: "{{ yum_snapshot_url }}/{{ yum_mongodb_snapshot }}/epel/Server/7/os/x86_64/"
       gpgkey: "{{ yum_mirror }}/pulp/gpg/RPM-GPG-KEY-EPEL-7"
       gpgcheck: yes
       sslverify: no
       priority: 1
       enabled: 1
       file: epel
       state: present

   - name: Install/Configure mongodb with galaxy role
     include_role:
       name: mongodb/undergreen.mongodb
     vars:
       mongodb_repository:
         "3.4": "{{ yum_snapshot_url }}/{{ yum_mongodb_snapshot }}/mongodb/el/7/3.4/os/x86_64/"
         "3.6": "{{ yum_snapshot_url }}/{{ yum_mongodb_snapshot }}/mongodb/el/7/3.6/os/x86_64/"
         "4.0": "{{ yum_snapshot_url }}/{{ yum_mongodb_snapshot }}/mongodb/el/7/4.0/os/x86_64/"
         "4.2": "{{ yum_snapshot_url }}/{{ yum_mongodb_snapshot }}/mongodb/el/7/4.2/os/x86_64/"

       mongodb_repository_gpgkey:
         "3.4": "{{ yum_mirror }}/pulp/gpg/mongodb/server-3.4.asc"
         "3.6": "{{ yum_mirror }}/pulp/gpg/mongodb/server-3.6.asc"
         "4.0": "{{ yum_mirror }}/pulp/gpg/mongodb/server-4.0.asc"
         "4.2": "{{ yum_mirror }}/pulp/gpg/mongodb/server-4.2.asc"
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

No branches or pull requests

1 participant