Browse Source

add mongo

master
zeus 4 years ago
parent
commit
8fc6eb536e
  1. 7
      install/usr/share/swarmlab.io/sec/project/courses/mongodb-org-shell/files/mongo-update.sh
  2. 20
      install/usr/share/swarmlab.io/sec/project/courses/mongodb-org-shell/mongodb-org-shell.yml

7
install/usr/share/swarmlab.io/sec/project/courses/mongodb-org-shell/files/mongo-update.sh

@ -0,0 +1,7 @@
#!/bin/sh
sudo apt-key list | \
grep "expired: " | \
sed -ne 's|pub .*/\([^ ]*\) .*|\1|gp' | \
xargs -n1 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys

20
install/usr/share/swarmlab.io/sec/project/courses/mongodb-org-shell/mongodb-org-shell.yml

@ -10,7 +10,7 @@
- name: apt mongo key - name: apt mongo key
become: true become: true
apt_key: apt_key:
id: 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 id: 6494C6D6997C215E
keyserver: keyserver.ubuntu.com keyserver: keyserver.ubuntu.com
- name: apt mongo repo - name: apt mongo repo
@ -19,6 +19,24 @@
repo: deb http://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse repo: deb http://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse
state: present state: present
# ------------------------
# cp update file mongo keys
# -------------------------
- name: cp mongo update file
become: true
copy:
src: "./files/mongo-update.sh"
dest: /project/mongo-update.sh
owner: docker
group: docker
mode: 0755
# ------------------------
# start update.sh
# -------------------------
- name: start mongo update file
shell: /project/mongo-update.sh -vv </dev/null >/dev/null 2>&1
# ------------------------ # ------------------------
# apt update # apt update
# ------------------------- # -------------------------

Loading…
Cancel
Save