Browse Source

test

master
lefos 3 years ago
parent
commit
adc1dde2b0
  1. 70
      monitorall.yml

70
monitorall.yml

@ -1,5 +1,5 @@
--- ---
- hosts: 192.25.0.3 - hosts: service
remote_user: docker remote_user: docker
gather_facts: no gather_facts: no
vars: vars:
@ -10,37 +10,37 @@
# ------------------------ # ------------------------
# apt update # apt update
# ------------------------- # -------------------------
- name: apt update packages - name: apt update packages
become: true become: true
apt: apt:
update_cache: 'yes' update_cache: 'yes'
force_apt_get: 'yes' force_apt_get: 'yes'
upgrade: 'dist' upgrade: 'dist'
cache_valid_time: 3600 cache_valid_time: 3600
install_recommends: true install_recommends: true
autoremove: true autoremove: true
# ------------------------ # ------------------------
# apt install packages # apt install packages
# ------------------------- # -------------------------
- name: apt install packages - name: apt install packages
become: true become: true
apt: apt:
update_cache: 'yes' update_cache: 'yes'
force_apt_get: 'yes' force_apt_get: 'yes'
install_recommends: true install_recommends: true
autoremove: true autoremove: true
name: "{{ packages }}" name: "{{ packages }}"
vars: vars:
packages: packages:
- build-essential - build-essential
- name: Import the public key used by the package management system # - name: Import the public key used by the package management system
apt_key: keyserver=hkp://keyserver.ubuntu.com:80 id=7F0CEB10 state=present # apt_key: keyserver=hkp://keyserver.ubuntu.com:80 id=7F0CEB10 state=present
- name: Add MongoDB repository # - name: Add MongoDB repository
apt_repository: repo='deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' state=present # apt_repository: repo='deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' state=present
- name: install mongodb # - name: install mongodb
apt: pkg=mongodb-org state=latest update_cache=yes # apt: pkg=mongodb-org state=latest update_cache=yes
notify: # notify:
- start mongodb # - start mongodb
handlers: # handlers:
- name: start mongodb # - name: start mongodb
service: name=mongod state=started # service: name=mongod state=started
Loading…
Cancel
Save