summaryrefslogtreecommitdiff
path: root/playbook.yml
blob: 40177d08c1d4bc87849262c5ac14967f4ee799f6 (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
- name: Setup kitchen
  hosts: localhost
  connection: local
  tasks:
    - name: Create output directory
      ansible.builtin.file:
        path: ./out/
        state: directory
        mode: '0775'

    - name: Create data directory
      ansible.builtin.file:
        path: ./out/data
        state: directory
        mode: '0775'

    - name: Clone repos
      ansible.builtin.git:
        repo: "{{ item }}"
        dest: "./out/{{ item | basename }}/"
        version: main
      loop:
        - https://git.marks.kitchen/cgit/journal_api.git
        - https://git.marks.kitchen/cgit/docker_cgit.git
        - https://github.com/Mark-Powers/cafe_bot.git

    - name: Clone repos
      ansible.builtin.git:
        repo: "{{ item }}"
        dest: "./out/{{ item | basename }}/"
        version: master
      loop:
        - https://git.marks.kitchen/cgit/soundboard.git
        - https://git.marks.kitchen/cgit/markskitchen.git
        - https://git.marks.kitchen/cgit/games.git
        - https://git.marks.kitchen/cgit/tracker-spa.git
        - https://git.marks.kitchen/cgit/markskitchen_hugo.git

    - name: Template docker-compose files
      ansible.builtin.template:
        src: "{{ item }}.j2"
        dest: ./out/{{ item }}
        mode: u=rw,g=r,o=r
      loop:
        - git-compose.yml
        - huginn-compose.yml
        - hugo_kitchen-compose.yml
        - journal-compose.yml
        - kitchen-compose.yml
        - miniflux-compose.yml
        - mumble-compose.yml
        - podcast-compose.yml
        - rss_bridge-compose.yml
        - tracker-compose.yml
        - cafe_bot-compose.yaml
        - docker-compose.yml

    - name: Template soundboard config
      ansible.builtin.template:
        src: "soundboard_config.js.j2"
        dest: ./out/soundboard.git/config.js
        mode: u=rw,g=r,o=r

    - name: Template bot config
      ansible.builtin.template:
        src: "cafe_bot.env.j2"
        dest: ./out/cafe_bot.git/.env
        mode: u=rw,g=r,o=r