summaryrefslogtreecommitdiffstats
path: root/docker-playbook.yml
blob: 124c55d76a02b380b310d6a358e6f1ac1b8344d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
- name: Load vars
  hosts: all
  tags: always
  tasks:
    - include_vars:
        file: docker-vars.yml
- name: Create a front container to be provisioned later
  tags: docker-front
  hosts: localhost
  tasks:
    - name: create docker container
      docker_container:
        name: emacsconf-front
        image: python:3-buster
        command: ["sleep", "1d"]
        pull: yes
        published_ports:
          - "28080:80"
          - "2022:22"
        
- name: Provision the emacsconf-front container created above
  tags: docker-front
  hosts: emacsconf-front
  roles:
    - wiki

- name: Create a pad container to be provisioned later
  tags: pad
  hosts: localhost
  tasks:
    - name: create docker container
      docker_container:
        name: emacsconf-pad
        image: python:3-buster
        command: ["sleep", "1d"]
        pull: yes
        published_ports:
          - "9001:9001"
        
- name: Provision the pad container created above
  tags: pad
  hosts: emacsconf-pad
  roles:
    - pad