Fix docker
This commit is contained in:
parent
f368faf66b
commit
323155b0e1
5 changed files with 19 additions and 8 deletions
|
@ -13,7 +13,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- aufs-tools
|
- aufs-tools
|
||||||
- cgroupfs-mount
|
- 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
|
- name: Copy default docker configuration
|
||||||
template: src=default-docker.j2 dest=/etc/default/docker backup=yes
|
template: src=default-docker.j2 dest=/etc/default/docker backup=yes
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
#DOCKER="/usr/local/bin/docker"
|
#DOCKER="/usr/local/bin/docker"
|
||||||
|
|
||||||
# Use DOCKER_OPTS to modify the daemon startup options.
|
# Use DOCKER_OPTS to modify the daemon startup options.
|
||||||
#{% if kube_network_plugin is defined and kube_network_plugin == "calico" %}
|
{% if kube_network_plugin is defined and kube_network_plugin == "calico" %}
|
||||||
#DOCKER_OPTS="--bridge=cbr0 --iptables=false --ip-masq=false"
|
DOCKER_OPTS="--bridge=cbr0 --iptables=false --ip-masq=false"
|
||||||
#{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# If you need Docker to use an HTTP proxy, it can also be specified here.
|
# If you need Docker to use an HTTP proxy, it can also be specified here.
|
||||||
#export http_proxy="http://127.0.0.1:3128/"
|
#export http_proxy="http://127.0.0.1:3128/"
|
||||||
|
|
|
@ -31,6 +31,7 @@ kube_cert_group: kube-cert
|
||||||
dns_domain: "{{ cluster_name }}"
|
dns_domain: "{{ cluster_name }}"
|
||||||
|
|
||||||
kube_proxy_mode: iptables
|
kube_proxy_mode: iptables
|
||||||
|
kube_master_port: 443
|
||||||
# IP address of the DNS server.
|
# IP address of the DNS server.
|
||||||
# Kubernetes will create a pod with several containers, serving as the DNS
|
# 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
|
# server and expose it under this IP address. The IP address must be from
|
||||||
|
|
|
@ -45,6 +45,10 @@
|
||||||
notify:
|
notify:
|
||||||
- restart daemons
|
- restart daemons
|
||||||
|
|
||||||
|
- debug: msg="{{groups['kube-master'][0]}} == {{inventory_hostname}}"
|
||||||
|
tags:
|
||||||
|
- debug
|
||||||
|
|
||||||
- include: gen_tokens.yml
|
- include: gen_tokens.yml
|
||||||
run_once: true
|
run_once: true
|
||||||
when: inventory_hostname == groups['kube-master'][0]
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
|
@ -11,10 +11,16 @@
|
||||||
|
|
||||||
- name: Calico | Write calico-node systemd init file
|
- name: Calico | Write calico-node systemd init file
|
||||||
template: src=calico/calico-node.service.j2 dest=/etc/systemd/system/calico-node.service
|
template: src=calico/calico-node.service.j2 dest=/etc/systemd/system/calico-node.service
|
||||||
|
register: newservice
|
||||||
notify:
|
notify:
|
||||||
- reload systemd
|
- reload systemd
|
||||||
- restart calico-node
|
- restart calico-node
|
||||||
|
|
||||||
|
- name: Calico | daemon-reload
|
||||||
|
command: systemctl daemon-reload
|
||||||
|
when: newservice|changed
|
||||||
|
changed_when: False
|
||||||
|
|
||||||
- name: Calico | Enable calico-node
|
- name: Calico | Enable calico-node
|
||||||
service: name=calico-node enabled=yes state=started
|
service: name=calico-node enabled=yes state=started
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue