Fix docker
parent
f368faf66b
commit
323155b0e1
|
@ -13,7 +13,7 @@
|
|||
with_items:
|
||||
- aufs-tools
|
||||
- cgroupfs-mount
|
||||
- docker-engine=1.8.3-0~{{ ansible_distribution_release }}
|
||||
- docker-engine=1.9.0-0~{{ ansible_distribution_release }}
|
||||
|
||||
- name: Copy default docker configuration
|
||||
template: src=default-docker.j2 dest=/etc/default/docker backup=yes
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
#DOCKER="/usr/local/bin/docker"
|
||||
|
||||
# Use DOCKER_OPTS to modify the daemon startup options.
|
||||
#{% if kube_network_plugin is defined and kube_network_plugin == "calico" %}
|
||||
#DOCKER_OPTS="--bridge=cbr0 --iptables=false --ip-masq=false"
|
||||
#{% endif %}
|
||||
{% if kube_network_plugin is defined and kube_network_plugin == "calico" %}
|
||||
DOCKER_OPTS="--bridge=cbr0 --iptables=false --ip-masq=false"
|
||||
{% endif %}
|
||||
|
||||
# If you need Docker to use an HTTP proxy, it can also be specified here.
|
||||
#export http_proxy="http://127.0.0.1:3128/"
|
||||
|
|
|
@ -31,6 +31,7 @@ kube_cert_group: kube-cert
|
|||
dns_domain: "{{ cluster_name }}"
|
||||
|
||||
kube_proxy_mode: iptables
|
||||
kube_master_port: 443
|
||||
# IP address of the DNS server.
|
||||
# Kubernetes will create a pod with several containers, serving as the DNS
|
||||
# server and expose it under this IP address. The IP address must be from
|
||||
|
|
|
@ -45,6 +45,10 @@
|
|||
notify:
|
||||
- restart daemons
|
||||
|
||||
- debug: msg="{{groups['kube-master'][0]}} == {{inventory_hostname}}"
|
||||
tags:
|
||||
- debug
|
||||
|
||||
- include: gen_tokens.yml
|
||||
run_once: true
|
||||
when: inventory_hostname == groups['kube-master'][0]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: Calico | Install calicoctl bin
|
||||
copy:
|
||||
copy:
|
||||
src={{ local_release_dir }}/calico/bin/calicoctl
|
||||
dest={{ bin_dir }}
|
||||
mode=u+x
|
||||
|
@ -11,22 +11,28 @@
|
|||
|
||||
- name: Calico | Write calico-node systemd init file
|
||||
template: src=calico/calico-node.service.j2 dest=/etc/systemd/system/calico-node.service
|
||||
notify:
|
||||
register: newservice
|
||||
notify:
|
||||
- reload systemd
|
||||
- restart calico-node
|
||||
|
||||
- name: Calico | daemon-reload
|
||||
command: systemctl daemon-reload
|
||||
when: newservice|changed
|
||||
changed_when: False
|
||||
|
||||
- name: Calico | Enable calico-node
|
||||
service: name=calico-node enabled=yes state=started
|
||||
|
||||
- name: Calico | Configure calico-node remove default pool
|
||||
shell: calicoctl pool remove 192.168.0.0/16
|
||||
environment:
|
||||
environment:
|
||||
ETCD_AUTHORITY: "{{ groups['kube-master'][0] }}:4001"
|
||||
run_once: true
|
||||
|
||||
- name: Calico | Configure calico-node desired pool
|
||||
shell: calicoctl pool add {{ kube_pods_subnet }}
|
||||
environment:
|
||||
environment:
|
||||
ETCD_AUTHORITY: "{{ groups['kube-master'][0] }}:4001"
|
||||
run_once: true
|
||||
|
||||
|
|
Loading…
Reference in New Issue