Fix merge conflict
commit
bf29198efd
|
@ -21,6 +21,10 @@ docker_dns_servers_strict: yes
|
||||||
|
|
||||||
docker_container_storage_setup: false
|
docker_container_storage_setup: false
|
||||||
|
|
||||||
|
# Used to override obsoletes=0
|
||||||
|
yum_conf: /etc/yum.conf
|
||||||
|
docker_yum_conf: /etc/yum_docker.conf
|
||||||
|
|
||||||
# CentOS/RedHat docker-ce repo
|
# CentOS/RedHat docker-ce repo
|
||||||
docker_rh_repo_base_url: 'https://download.docker.com/linux/centos/7/$basearch/stable'
|
docker_rh_repo_base_url: 'https://download.docker.com/linux/centos/7/$basearch/stable'
|
||||||
docker_rh_repo_gpgkey: 'https://download.docker.com/linux/centos/gpg'
|
docker_rh_repo_gpgkey: 'https://download.docker.com/linux/centos/gpg'
|
||||||
|
|
|
@ -30,6 +30,8 @@
|
||||||
tags:
|
tags:
|
||||||
- facts
|
- facts
|
||||||
|
|
||||||
|
- import_tasks: pre-upgrade.yml
|
||||||
|
|
||||||
- name: ensure docker-ce repository public key is installed
|
- name: ensure docker-ce repository public key is installed
|
||||||
action: "{{ docker_repo_key_info.pkg_key }}"
|
action: "{{ docker_repo_key_info.pkg_key }}"
|
||||||
args:
|
args:
|
||||||
|
@ -78,11 +80,27 @@
|
||||||
dest: "/etc/yum.repos.d/docker.repo"
|
dest: "/etc/yum.repos.d/docker.repo"
|
||||||
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic
|
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic
|
||||||
|
|
||||||
|
- name: Copy yum.conf for editing
|
||||||
|
copy:
|
||||||
|
src: "{{ yum_conf }}"
|
||||||
|
dest: "{{ docker_yum_conf }}"
|
||||||
|
remote_src: yes
|
||||||
|
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic
|
||||||
|
|
||||||
|
- name: Edit copy of yum.conf to set obsoletes=0
|
||||||
|
lineinfile:
|
||||||
|
path: "{{ docker_yum_conf }}"
|
||||||
|
state: present
|
||||||
|
regexp: '^obsoletes='
|
||||||
|
line: 'obsoletes=0'
|
||||||
|
when: ansible_distribution in ["CentOS","RedHat"] and not is_atomic
|
||||||
|
|
||||||
- name: ensure docker packages are installed
|
- name: ensure docker packages are installed
|
||||||
action: "{{ docker_package_info.pkg_mgr }}"
|
action: "{{ docker_package_info.pkg_mgr }}"
|
||||||
args:
|
args:
|
||||||
pkg: "{{item.name}}"
|
pkg: "{{item.name}}"
|
||||||
force: "{{item.force|default(omit)}}"
|
force: "{{item.force|default(omit)}}"
|
||||||
|
conf_file: "{{item.yum_conf|default(omit)}}"
|
||||||
state: present
|
state: present
|
||||||
register: docker_task_result
|
register: docker_task_result
|
||||||
until: docker_task_result|succeeded
|
until: docker_task_result|succeeded
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
- name: Ensure old versions of Docker are not installed. | Debian
|
||||||
|
package:
|
||||||
|
name: '{{ item }}'
|
||||||
|
state: absent
|
||||||
|
with_items:
|
||||||
|
- docker
|
||||||
|
- docker-engine
|
||||||
|
when: ansible_os_family == 'Debian' and (docker_versioned_pkg[docker_version | string] | search('docker-ce'))
|
||||||
|
|
||||||
|
- name: Ensure old versions of Docker are not installed. | RedHat
|
||||||
|
package:
|
||||||
|
name: '{{ item }}'
|
||||||
|
state: absent
|
||||||
|
with_items:
|
||||||
|
- docker
|
||||||
|
- docker-common
|
||||||
|
- docker-engine
|
||||||
|
- docker-selinux
|
||||||
|
when: ansible_os_family == 'RedHat' and (docker_versioned_pkg[docker_version | string] | search('docker-ce'))
|
|
@ -28,7 +28,9 @@ docker_package_info:
|
||||||
pkg_mgr: yum
|
pkg_mgr: yum
|
||||||
pkgs:
|
pkgs:
|
||||||
- name: "{{ docker_selinux_versioned_pkg[docker_selinux_version | string] }}"
|
- name: "{{ docker_selinux_versioned_pkg[docker_selinux_version | string] }}"
|
||||||
|
yum_conf: "{{ docker_yum_conf }}"
|
||||||
- name: "{{ docker_versioned_pkg[docker_version | string] }}"
|
- name: "{{ docker_versioned_pkg[docker_version | string] }}"
|
||||||
|
yum_conf: "{{ docker_yum_conf }}"
|
||||||
|
|
||||||
docker_repo_key_info:
|
docker_repo_key_info:
|
||||||
pkg_key: ''
|
pkg_key: ''
|
||||||
|
|
|
@ -15,9 +15,6 @@ DNS.5 = localhost
|
||||||
{% for host in groups['kube-master'] %}
|
{% for host in groups['kube-master'] %}
|
||||||
DNS.{{ counter["dns"] }} = {{ host }}{{ increment(counter, 'dns') }}
|
DNS.{{ counter["dns"] }} = {{ host }}{{ increment(counter, 'dns') }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for host in groups['kube-node'] %}
|
|
||||||
DNS.{{ counter["dns"] }} = {{ host }}{{ increment(counter, 'dns') }}
|
|
||||||
{% endfor %}
|
|
||||||
{% if apiserver_loadbalancer_domain_name is defined %}
|
{% if apiserver_loadbalancer_domain_name is defined %}
|
||||||
DNS.{{ counter["dns"] }} = {{ apiserver_loadbalancer_domain_name }}{{ increment(counter, 'dns') }}
|
DNS.{{ counter["dns"] }} = {{ apiserver_loadbalancer_domain_name }}{{ increment(counter, 'dns') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -27,12 +24,6 @@ IP.{{ counter["ip"] }} = {{ hostvars[host]['access_ip'] }}{{ increment(counter,
|
||||||
{% endif %}
|
{% endif %}
|
||||||
IP.{{ counter["ip"] }} = {{ hostvars[host]['ip'] | default(hostvars[host]['ansible_default_ipv4']['address']) }}{{ increment(counter, 'ip') }}
|
IP.{{ counter["ip"] }} = {{ hostvars[host]['ip'] | default(hostvars[host]['ansible_default_ipv4']['address']) }}{{ increment(counter, 'ip') }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for host in groups['kube-node'] %}
|
|
||||||
{% if hostvars[host]['access_ip'] is defined %}
|
|
||||||
IP.{{ counter["ip"] }} = {{ hostvars[host]['access_ip'] }}{{ increment(counter, 'ip') }}
|
|
||||||
{% endif %}
|
|
||||||
IP.{{ counter["ip"] }} = {{ hostvars[host]['ip'] | default(hostvars[host]['ansible_default_ipv4']['address']) }}{{ increment(counter, 'ip') }}
|
|
||||||
{% endfor %}
|
|
||||||
{% if kube_apiserver_ip is defined %}
|
{% if kube_apiserver_ip is defined %}
|
||||||
IP.{{ counter["ip"] }} = {{ kube_apiserver_ip }}{{ increment(counter, 'ip') }}
|
IP.{{ counter["ip"] }} = {{ kube_apiserver_ip }}{{ increment(counter, 'ip') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue