
- name: add GPG key
  apt_key:
    url: https://download.docker.com/linux/ubuntu/gpg
    state: present
  tags:
    - docker

- name: add docker repository to apt
  apt_repository:
    repo: deb https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable
    state: present
  tags:
    - docker

- name: install docker
  apt:
    name: "{{item}}"
    state: present
    update_cache: yes
  loop:
    - docker-ce
    - docker-ce-cli
  tags:
    - docker

- name: Allow docker to access redis
  lineinfile:
    path: /etc/redis/redis.conf
    line: bind 127.0.0.1 ::1 172.17.0.1
    regex: ^bind
  tags:
    - docker
  notify:
   - restart redis

- name: Make sure docker can access MariaDB
  copy:
    src: mysql/docker.cnf
    dest: /etc/mysql/mariadb.conf.d/60-docker.cnf
    owner: root
    mode: '0664'
  tags:
    - docker
  notify:
   - restart mysql

- name: Add users to docker group
  user:
    name: "{{ item }}"
    groups: docker
    append: yes
  with_items:
    - aquarion
    - ccooke
  tags:
    - docker


- name: add GPG key
  apt_key:
    url: https://download.docker.com/linux/ubuntu/gpg
    state: present
  tags:
    - docker

- name: add docker repository to apt
  apt_repository:
    repo: deb https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable
    state: present
  tags:
    - docker

- name: install docker
  apt:
    name: "{{ item }}"
    state: present
    update_cache: yes
  loop:
    - docker-ce
    - docker-ce-cli
  tags:
    - docker

- name: Allow docker to access redis
  lineinfile:
    path: /etc/redis/redis.conf
    line: bind 127.0.0.1 ::1 172.17.0.1
    regex: ^bind
  tags:
    - docker
  notify:
   - restart redis

- name: Make sure docker can access MariaDB
  copy:
    src: mysql/docker.cnf
    dest: /etc/mysql/mariadb.conf.d/60-docker.cnf
    owner: root
    mode: '0664'
  tags:
    - docker
  notify:
   - restart mysql

- name: Add users to docker group
  user:
    name: "{{ item }}"
    groups: docker
    append: yes
  with_items:
    - aquarion
    - ccooke
  tags:
    - docker

Add spaces to make lint happy
Add spaces to make lint happy
