summaryrefslogtreecommitdiff
path: root/baserock_ostree/image-config.yml
blob: 21c7ba241e494da1568e75670fb457316a828b63 (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
# System configuration for Baserock OStree cache server.
#
# Tested against Fedora 26 base image.
---
- hosts: ostree
  gather_facts: false
  become: yes
  become_user: root
  tasks:
  # See: https://fedoramagazine.org/getting-ansible-working-fedora-23/
  - name: install Python2 and required deps for Ansible modules
    raw: dnf install -y python2 python2-dnf libselinux-python

  - name: enable persistant journal
    shell: mkdir /var/log/journal
    args:
      creates: /var/log/journal

  - name: ensure system up to date
    dnf: name=* state=latest

  - name: install lvm2 tools
    dnf: name=lvm2 state=latest

  - name: lighttpd installed
    dnf: name=lighttpd state=latest

  - name: ostree installed
    dnf: name=ostree state=latest

  # We only need BuildStream for the bst-artifact-receive hook, but it's
  # easiest to install all the deps
  - name: buildstream dep - bubblewrap
    dnf: name=bubblewrap state=latest
  - name: buildstream dep - git
    dnf: name=git state=latest
  - name: buildstream dep - python3-gobject
    dnf: name=python3-gobject state=latest
  - name: buildstream dep - python3-pip
    dnf: name=python3-pip state=latest

  - name: buildstream sources
    git: dest=/home/fedora/buildstream repo=https://gitlab.com/buildstream/buildstream version=bf8fc373d7711861129ab841a74ecf32b3d8b2dd
    become_user: fedora

  - name: buildstream installed
    command: /usr/bin/pip3 install .
    args:
      chdir: /home/fedora/buildstream
      creates: /usr/bin/bst-artifact-receive

  # We also install ostree-push/receive, which is used for pushing to the
  # releases/ repo.
  - name: ostree-push/receive sources
    git: dest=/home/fedora/ostree-push repo=https://github.com/ssssam/ostree-push version=9aa82b67325786a810653155b952a17b7ccc436a
    become_user: fedora

  - name: ostree-push/receive installed
    command: make PREFIX=/usr/ install
    args:
      chdir: /home/fedora/ostree-push
      creates: /usr/bin/ostree-receive

  - name: disable SELinux on subsequent boots
    selinux: state=disabled

  - name: disable SELinux on current boot
    command: setenforce 0