You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
---
|
|
|
|
- hosts: service
|
|
|
|
remote_user: docker
|
|
|
|
gather_facts: no
|
|
|
|
vars:
|
|
|
|
user: "docker"
|
|
|
|
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
# ------------------------
|
|
|
|
# apt update
|
|
|
|
# -------------------------
|
|
|
|
# - name: apt update packages
|
|
|
|
# become: true
|
|
|
|
# apt:
|
|
|
|
# update_cache: 'yes'
|
|
|
|
# force_apt_get: 'yes'
|
|
|
|
# upgrade: 'dist'
|
|
|
|
# cache_valid_time: 3600
|
|
|
|
# install_recommends: true
|
|
|
|
# autoremove: true
|
|
|
|
|
|
|
|
# ------------------------
|
|
|
|
# apt install packages
|
|
|
|
# -------------------------
|
|
|
|
# - name: apt install packages
|
|
|
|
# become: true
|
|
|
|
# apt:
|
|
|
|
# update_cache: 'yes'
|
|
|
|
# force_apt_get: 'yes'
|
|
|
|
# install_recommends: true
|
|
|
|
# autoremove: true
|
|
|
|
# name: "{{ packages }}"
|
|
|
|
# vars:
|
|
|
|
# packages:
|
|
|
|
# - build-essential
|
|
|
|
# - git
|
|
|
|
# - flex
|
|
|
|
# - bison
|
|
|
|
# - traceroute
|
|
|
|
# - 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
|