You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.3 KiB

6 years ago
  1. ---
  2. - name: docker-storage-setup | install git and make
  3. with_items: [git, make]
  4. package:
  5. pkg: "{{ item }}"
  6. state: present
  7. - name: docker-storage-setup | docker-storage-setup sysconfig template
  8. template:
  9. src: docker-storage-setup.j2
  10. dest: /etc/sysconfig/docker-storage-setup
  11. - name: docker-storage-override-directory | docker service storage-setup override dir
  12. file:
  13. dest: /etc/systemd/system/docker.service.d
  14. mode: 0755
  15. owner: root
  16. group: root
  17. state: directory
  18. - name: docker-storage-override | docker service storage-setup override file
  19. copy:
  20. dest: /etc/systemd/system/docker.service.d/override.conf
  21. content: |-
  22. ### This file is managed by Ansible
  23. [Service]
  24. EnvironmentFile=-/etc/sysconfig/docker-storage
  25. owner: root
  26. group: root
  27. mode: 0644
  28. # https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-using-the-repository
  29. - name: docker-storage-setup | install lvm2
  30. yum:
  31. name: lvm2
  32. state: present
  33. - name: docker-storage-setup | install and run container-storage-setup
  34. become: yes
  35. script: |
  36. install_container_storage_setup.sh \
  37. {{ docker_container_storage_setup_repository }} \
  38. {{ docker_container_storage_setup_version }} \
  39. {{ docker_container_storage_setup_profile_name }}
  40. notify: Docker | reload systemd