在《The DevOps 2.0 Toolkit》測試時要做的ansible的配置更改

這本極有用。要看完,測試完。python

 

原生的配置:git

- name: Docker Compose is present
  get_url:
    url: https://github.com/docker/compose/releases/download/1.4.1/docker-compose-Linux-x86_64
    dest: /usr/local/bin/docker-compose
  tags: [docker]

由於總是超時,因此更改成以下的紅字,先本身CP下來,再CP到VAGRANT中去。github

- name: Add Docker repository and update apt cache
  apt_repository:
    repo: deb https://apt.dockerproject.org/repo ubuntu-trusty main
    update_cache: yes
    state: present
  tags: [docker]

- name: Docker is present
  apt:
    name: docker-engine
    state: latest
    force: yes
  tags: [docker]

- name: Python-pip is present
  apt: name=python-pip state=present
  tags: [docker]

- name: Docker-py is present
  pip: name=docker-py version=0.4.0 state=present
  tags: [docker]

- name: Docker Compose is present copy: src=/vagrant/docker-compose-Linux-x86_64 dest=/usr/local/bin/docker-compose tags: [docker]

- name: Docker Compose permissions are set
  file:
    path: /usr/local/bin/docker-compose
    mode: 0755
  tags: [docker]
相關文章
相關標籤/搜索