From bf7ac7ab360306363e84513a89146ba748a811e4 Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 1 Sep 2020 21:22:06 -0400 Subject: [PATCH] mongodb/tasks/install.yml revisions --- roles/mongodb/tasks/install.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/roles/mongodb/tasks/install.yml b/roles/mongodb/tasks/install.yml index 0e07ca746..c65597cbb 100644 --- a/roles/mongodb/tasks/install.yml +++ b/roles/mongodb/tasks/install.yml @@ -57,14 +57,15 @@ with_items: - { src: 'mongod.conf.j2', dest: "{{ mongodb_conf }}", mode: '0644' } # i.e. /etc/mongod.conf - # end block when: not (ansible_architecture == "x86_64" or ansible_architecture == "aarch64") + # 32 bit OS's get caught above should handle aarch32 including 32-bit ubuntu # from https://ubuntu.com/download/raspberry-pi. 20.4-32bit might fail untested # 32bit intel might puke as this was orginally deployed for raspbian. Haven't # see bootable 32bit intel installers for a while now. # 64 bit OS's proceed below. + - block: - name: Add mongodb.org signing key (only 64-bit support available) shell: wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add - @@ -84,21 +85,21 @@ repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse state: present filename: mongodb-org - when: (ansible_architecture == "aarch64" and is_raspbian_10) + when: (ansible_architecture == "aarch64" and is_raspbian) - - name: Use mongodb-org's Ubuntu focal repo for Mint 20 - 64bit only + - name: Use mongodb-org's Ubuntu focal repo for Linux Mint - 64bit only apt_repository: repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse state: present filename: mongodb-org - when: is_mint_20 + when: is_linuxmint | bool - - name: Use mongodb-org's Ubuntu repo for Ubuntu all - 64bit only + - name: Use mongodb-org's Ubuntu repo for all non-Mint Ubuntu - 64bit only apt_repository: repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/4.4 multiverse state: present filename: mongodb-org - when: is_ubuntu and not is_mint + when: is_ubuntu and not is_linuxmint - name: "Install packages: mongodb-org, mongodb-org-server" package: @@ -152,6 +153,7 @@ enabled: no state: restarted + # 3. RECORD MongoDB AS INSTALLED - name: "Set 'mongodb_installed: True'"