mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-12 08:43:55 +02:00
13ab9eb238
Let's let the admin set them as they wish. We don't care what they are anyway. If other things run on the same server, it's also better not to hijack these for our own purposes, especially when we don't need to. The timedatectl call also seems to fail on Ubuntu 17.04 for some reason (missing timezones information file?).
41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
---
|
|
|
|
- name: Ensure Docker repository is enabled (CentOS)
|
|
template:
|
|
src: "{{ role_path }}/files/yum.repos.d/{{ item }}"
|
|
dest: "/etc/yum.repos.d/{{ item }}"
|
|
owner: "root"
|
|
group: "root"
|
|
mode: 0644
|
|
with_items:
|
|
- docker-ce.repo
|
|
when: ansible_distribution == 'CentOS'
|
|
|
|
- name: Ensure Docker's RPM key is trusted
|
|
rpm_key:
|
|
state: present
|
|
key: https://download.docker.com/linux/centos/gpg
|
|
when: ansible_distribution == 'CentOS'
|
|
|
|
- name: Ensure yum packages are installed (base)
|
|
yum: name="{{ item }}" state=latest update_cache=yes
|
|
with_items:
|
|
- bash-completion
|
|
- docker-ce
|
|
- docker-python
|
|
- firewalld
|
|
- ntp
|
|
when: ansible_distribution == 'CentOS'
|
|
|
|
- name: Ensure firewalld is started and autoruns
|
|
service: name=firewalld state=started enabled=yes
|
|
|
|
- name: Ensure Docker is started and autoruns
|
|
service: name=docker state=started enabled=yes
|
|
|
|
- name: Ensure ntpd is started and autoruns
|
|
service: name=ntpd state=started enabled=yes
|
|
|
|
- name: Ensure SELinux disabled
|
|
selinux: state=disabled
|