---
  # Parameters:
  #  prudentia_dir (provided)
  #  mongodb3_version (provided)

  - name: MongoDB 3 | Check if is present
    command: test -x /usr/bin/mongo
    when: ansible_system == "Linux"
    ignore_errors: yes
    register: mongo_present
    tags:
      - mongodb3

  - name: MongoDB 3 | Add GPG key to apt keyring
    apt_key: id=EA312927 url=keyserver.ubuntu.com
    become: yes
    tags:
      - mongodb3

  - name: MongoDB 3 | Add Debian apt repository
    apt_repository: repo="deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/{{mongodb3_version}} multiverse"
    when: ansible_os_family == "Debian" and mongo_present|failed
    become: yes
    tags:
      - mongodb3

  - name: MongoDB 3 | Install
    apt: update-cache=yes force=yes state=present pkg=mongodb-org
    when: ansible_os_family == "Debian" and mongo_present|failed
    become: yes
    tags:
      - mongodb3

---
  # Parameters:
  #  prudentia_dir (provided)
  #  mongodb3_version (provided)

  - name: MongoDB 3 | Check if is present
    command: test -x /usr/bin/mongo
    when: ansible_system == "Linux"
    ignore_errors: yes
    register: mongo_present
    tags:
      - mongodb3

  - name: MongoDB 3 | Add GPG key to apt keyring
    apt_key: id=EA312927 keyserver=keyserver.ubuntu.com
    become: yes
    tags:
      - mongodb3

  - name: MongoDB 3 | Add Debian apt repository
    apt_repository: repo="deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/{{mongodb3_version}} multiverse"
    when: ansible_os_family == "Debian" and mongo_present|failed
    become: yes
    tags:
      - mongodb3

  - name: MongoDB 3 | Install
    apt: update-cache=yes force=yes state=present pkg=mongodb-org
    when: ansible_os_family == "Debian" and mongo_present|failed
    become: yes
    tags:
      - mongodb3

Use 'keyserver' instead of URL
fix(mongo3_install): Use 'keyserver' instead of URL
