2017-09-25 19:29:17 +08:00
|
|
|
---
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Docker-storage-setup | install git and make
|
2017-09-25 19:29:17 +08:00
|
|
|
with_items: [git, make]
|
|
|
|
package:
|
|
|
|
pkg: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Docker-storage-setup | docker-storage-setup sysconfig template
|
2017-09-25 19:29:17 +08:00
|
|
|
template:
|
|
|
|
src: docker-storage-setup.j2
|
|
|
|
dest: /etc/sysconfig/docker-storage-setup
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0644"
|
2017-09-25 19:29:17 +08:00
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Docker-storage-override-directory | docker service storage-setup override dir
|
2017-09-25 19:29:17 +08:00
|
|
|
file:
|
|
|
|
dest: /etc/systemd/system/docker.service.d
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0755"
|
2017-09-25 19:29:17 +08:00
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
state: directory
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Docker-storage-override | docker service storage-setup override file
|
2017-09-25 19:29:17 +08:00
|
|
|
copy:
|
|
|
|
dest: /etc/systemd/system/docker.service.d/override.conf
|
|
|
|
content: |-
|
2017-11-22 05:37:52 +08:00
|
|
|
### This file is managed by Ansible
|
2017-09-25 19:29:17 +08:00
|
|
|
[Service]
|
|
|
|
EnvironmentFile=-/etc/sysconfig/docker-storage
|
|
|
|
|
|
|
|
owner: root
|
|
|
|
group: root
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0644"
|
2017-09-25 19:29:17 +08:00
|
|
|
|
2018-02-07 16:12:28 +08:00
|
|
|
# https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-using-the-repository
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Docker-storage-setup | install lvm2
|
2021-06-05 19:16:39 +08:00
|
|
|
package:
|
2017-12-15 20:06:55 +08:00
|
|
|
name: lvm2
|
|
|
|
state: present
|
|
|
|
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Docker-storage-setup | install and run container-storage-setup
|
2017-09-25 19:29:17 +08:00
|
|
|
become: yes
|
2019-02-26 11:29:32 +08:00
|
|
|
script: |
|
|
|
|
install_container_storage_setup.sh \
|
|
|
|
{{ docker_container_storage_setup_repository }} \
|
|
|
|
{{ docker_container_storage_setup_version }} \
|
|
|
|
{{ docker_container_storage_setup_profile_name }}
|
2017-09-25 19:29:17 +08:00
|
|
|
notify: Docker | reload systemd
|