aboutsummaryrefslogtreecommitdiff
path: root/provision.yml
blob: 00ae2fd009c9aefb489979f82a8144300200405f (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
---
- name: Bootstrap Alpine Linux
  hosts: alpine
  gather_facts: false
  become: true

  tasks:
    - name: Install Python 3
      ansible.builtin.raw: test -x /usr/bin/python3 || apk add --no-cache python3
      register: bootstrap_python
      changed_when: bootstrap_python.stdout != ""

- name: Provision VPS
  hosts: vps
  become: true
  roles:
    - role: base
      vars:
        hostname: "vps"
        username: "cmmm"
        nameservers:
          - "212.227.123.16"
          - "212.227.123.17"
        repositories:
          - "https://dl-cdn.alpinelinux.org/alpine/edge/main"
          - "https://dl-cdn.alpinelinux.org/alpine/edge/community"
          - "https://dl-cdn.alpinelinux.org/alpine/edge/testing"
          - "/home/cmmm/packages/testing"

    - role: fail2ban

    - role: nginx