From 63465990072633014e87495b43f03d3f56f1e286 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 15 Jan 2022 12:34:57 +0100 Subject: [PATCH] feat: add playbooks for toolboxes Signed-off-by: Matej Focko --- .../roles/fedora/packages/tasks/haskell.yml | 7 ---- toolboxes/README.md | 24 +++++++++++++ toolboxes/cpp.yml | 34 +++++++++++++++++++ toolboxes/haskell.yml | 12 +++++++ 4 files changed, 70 insertions(+), 7 deletions(-) delete mode 100644 playbooks/roles/fedora/packages/tasks/haskell.yml create mode 100644 toolboxes/README.md create mode 100644 toolboxes/cpp.yml create mode 100644 toolboxes/haskell.yml diff --git a/playbooks/roles/fedora/packages/tasks/haskell.yml b/playbooks/roles/fedora/packages/tasks/haskell.yml deleted file mode 100644 index eda31a6..0000000 --- a/playbooks/roles/fedora/packages/tasks/haskell.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Install ghc and hlint - dnf: - name: - - "@ghc:8.10" - - hlint - state: present diff --git a/toolboxes/README.md b/toolboxes/README.md new file mode 100644 index 0000000..18b464f --- /dev/null +++ b/toolboxes/README.md @@ -0,0 +1,24 @@ +# Maintaining toolboxes + +## How to keep Fedora toolbox up-to-date + +1. Pull latest toolbox + + \$ podman pull fedora-toolbox:35 + +2. Run the container + + \$ podman run -ti fedora-toolbox:35 /bin/bash + +3. Copy your current repos + + \$ podman cp /etc/yum.repos.d/ ‹container ID›:/etc/ + +4. Run upgrade & install common packages inside the container + + (container)$ dnf upgrade + (container)$ dnf install -y zsh tmux neovim ansible make + +5. Commit the image + + \$ podman commit ‹container ID› fedora-toolbox:35 diff --git a/toolboxes/cpp.yml b/toolboxes/cpp.yml new file mode 100644 index 0000000..548e0e5 --- /dev/null +++ b/toolboxes/cpp.yml @@ -0,0 +1,34 @@ +--- +- name: Prepare C/C++ container + hosts: all + become: yes + become_method: sudo + tasks: + - name: Install compilers + dnf: + name: + - gcc + - clang + state: present + - name: Install linters and tools + dnf: + name: + - clang-tools-extra + - cppcheck + state: present + - name: Install build systems + dnf: + name: + - cmake + - make + state: present + + - name: Install Karel + block: + - name: Enable Copr repository + shell: dnf copr enable -y mfocko/karel + - name: Install Karel library + dnf: + name: libkarel + state: present + tags: karel diff --git a/toolboxes/haskell.yml b/toolboxes/haskell.yml new file mode 100644 index 0000000..4d44161 --- /dev/null +++ b/toolboxes/haskell.yml @@ -0,0 +1,12 @@ +--- +- name: Prepare haskell container + hosts: all + become: yes + become_method: sudo + tasks: + - name: Install ghci + dnf: + name: + - ghc + - hlint + state: present