diff options
-rw-r--r-- | baserock_ostree/image-config.yml | 78 |
1 files changed, 47 insertions, 31 deletions
diff --git a/baserock_ostree/image-config.yml b/baserock_ostree/image-config.yml index 28a1e3b6..a4298500 100644 --- a/baserock_ostree/image-config.yml +++ b/baserock_ostree/image-config.yml @@ -3,67 +3,83 @@ # 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 + apt: + upgrade: yes + update_cache: yes - name: install lvm2 tools - dnf: name=lvm2 state=latest + apt: + name: lvm2 - name: lighttpd installed - dnf: name=lighttpd state=latest + apt: + name: lighttpd - name: ostree installed - dnf: name=ostree state=latest + apt: + name: ostree + + - name: pkg-config installed + apt: + name: pkg-config # 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 + apt: + name: bubblewrap + - name: buildstream dep - libcairo2-dev + apt: + name: libcairo2-dev + - name: buildstream dep - libgirepository1.0-dev + apt: + name: libgirepository1.0-dev - name: buildstream dep - git - dnf: name=git state=latest - - name: buildstream dep - python3-gobject - dnf: name=python3-gobject state=latest + apt: + name: git - name: buildstream dep - python3-pip - dnf: name=python3-pip state=latest + apt: + name: python3-pip + - name: buildstream dep - python3-gobject - from pip + pip: + name: PyGObject + version: "3.40.1" + executable: pip3 + +# - name: buildstream dep - python3-gobject +# apt: +# name: python3-gobject + - name: buildstream sources - git: dest=/home/fedora/buildstream repo=https://gitlab.com/buildstream/buildstream version=1.1.3 - become_user: fedora + git: + dest: /home/{{ ansible_user_id }}/buildstream + repo: https://gitlab.com/buildstream/buildstream + version: 1.1.3 + become_user: "{{ ansible_user_id }}" register: buildstream_source - name: buildstream installed command: /usr/bin/pip3 install . args: - chdir: /home/fedora/buildstream + chdir: /home/{{ ansible_user_id }}/buildstream when: buildstream_source.changed # 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 + git: + dest: /home/{{ ansible_user_id }}/ostree-push + repo: https://github.com/ssssam/ostree-push + version: 9aa82b67325786a810653155b952a17b7ccc436a + become_user: "{{ ansible_user_id }}" - name: ostree-push/receive installed command: make PREFIX=/usr/ install args: - chdir: /home/fedora/ostree-push + chdir: /home/{{ ansible_user_id }}/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 |