lefos 3 years ago
parent
commit
f850108a43
  1. 14
      mongo.yml
  2. 6
      monitorall.yml.sh

14
mongo.yml

@ -41,9 +41,11 @@
# - curl
# - lynx
# - ruby
- name: Add Mongo packages repo
apt_key: id=2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 keyserver=keyserver.ubuntu.com
- name: add repo itself
apt_repository: repo='deb http://repo.mongodb.org/apt/ubuntu {{ansible_distribution_release}}/mongodb-org/3.4 multiverse' state=present
- name: install packages
apt: pkg=mongodb-org state=present
- name: Import the public key used by the package management system
apt_key: keyserver=hkp://keyserver.ubuntu.com:80 id=7F0CEB10 state=present
- name: Add MongoDB repository
apt_repository: repo='deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' state=present
- name: install mongodb
apt: pkg=mongodb-org state=latest update_cache=yes
notify:
- start mongodb

6
monitorall.yml.sh

@ -20,11 +20,11 @@ echo "[service]" > /project/courses/Thesis/inventory.yml
# include master or not
echo $ip4 >> /project/courses/Thesis/inventory.yml
#dummy
ansible-playbook -u docker -i inventory.yml node.yml -f 5 --ask-pass --ask-become-pass
#dummy DONE
# ansible-playbook -u docker -i inventory.yml node.yml -f 5 --ask-pass --ask-become-pass
#mongo
# ansible-playbook -u docker -i inventory.yml mongo.yml -f 5 --ask-pass --ask-become-pass
ansible-playbook -u docker -i inventory.yml mongo.yml -f 5 --ask-pass --ask-become-pass
# 1st make sudo without password
# run with keys

Loading…
Cancel
Save