Coreos-bootstrap 是使用 Ansible 来启动 CoreOS 主机。
配置示例:
[coreos] host-01 host-02 [coreos:vars] ansible_ssh_user=core ansible_python_interpreter="PATH=/home/core/bin:$PATH python"
启动演示
- hosts: coreos gather_facts: False roles: - defunctzombie.coreos-bootstrap
示例
- name: Nginx Example hosts: web sudo: true tasks: - name: Start etcd service: name=etcd.service state=started - name: Install docker-py pip: name=docker-py - name: pull container raw: docker pull nginx:1.7.1 - name: launch nginx container docker: ports="8080:80" state=running