6c4d100911
Removed code try to install Wily(15.10) kernel in case of Ubuntu Trusty(14.04). Last Openstack version supported on Ubuntu 14.04 is Mitaka. Hence Ubuntu 14.04 related code can be safely remove from Ansible tasks since Kolla Newton release. Co-Authored-By: Duong Ha-Quang <duonghq@vn.fujitsu.com> Change-Id: Ieca7975a69fb0ba8b49cc522f05e4beca1c2f526
70 lines
1.4 KiB
YAML
70 lines
1.4 KiB
YAML
---
|
|
- name: Ensure docker service directory exists
|
|
file:
|
|
path=/etc/systemd/system/docker.service.d
|
|
state=directory
|
|
recurse=yes
|
|
become: True
|
|
|
|
- name: Configure docker service
|
|
become: True
|
|
template:
|
|
src=docker_systemd_service.j2
|
|
dest=/etc/systemd/system/docker.service.d/kolla.conf
|
|
register: docker_configured
|
|
|
|
- name: Reload docker service file
|
|
become: True
|
|
command: systemctl daemon-reload
|
|
|
|
- name: Get stat of libvirtd apparmor profile
|
|
stat: path=/etc/apparmor.d/usr.sbin.libvirtd
|
|
register: apparmor_libvirtd_profile
|
|
when: ansible_distribution == "Ubuntu"
|
|
|
|
- name: Remove apparmor profile for libvirt
|
|
command: apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
|
|
become: True
|
|
when:
|
|
- ansible_distribution == "Ubuntu"
|
|
- apparmor_libvirtd_profile.stat.exists | bool
|
|
|
|
- name: Create docker group
|
|
group:
|
|
name: docker
|
|
become: True
|
|
|
|
- name: Add kolla user to docker group
|
|
user:
|
|
name: kolla
|
|
append: yes
|
|
groups: docker
|
|
become: True
|
|
when: create_kolla_user | bool
|
|
|
|
- name: Start docker
|
|
service:
|
|
name: docker
|
|
state: started
|
|
become: True
|
|
|
|
- name: Restart docker
|
|
service:
|
|
name: docker
|
|
state: restarted
|
|
become: True
|
|
when: docker_configured.changed
|
|
|
|
- name: Enable docker
|
|
service:
|
|
name: docker
|
|
enabled: yes
|
|
become: True
|
|
|
|
- name: Reboot
|
|
command: reboot -f
|
|
become: True
|
|
when:
|
|
- reboot_required is defined
|
|
- reboot_required | bool
|