Skip to content

FEATURE: Allow disconnected install #222

Open
@RonnyMaas

Description

@RonnyMaas

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions