summaryrefslogtreecommitdiff
path: root/baserock_ostree/image-config.yml
blob: aa0f34934503ab84460da34acda27bb558a2e2a1 (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
# System configuration for Baserock OStree cache server.
#
# Tested against Fedora 26 base image.
---
- hosts: ostree
  gather_facts: false
  sudo: yes
  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=977210795c9ec67309eae3b78e2100c6b2281823

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

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

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