From 3e250fd12beb37f2b2ed983c2b535327f3ee9a5e Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Sat, 30 Oct 2021 10:18:46 +0300 Subject: [PATCH] Added flatpak role to install software --- .gitlab-ci.yml | 4 ++-- roles/.empty => play_server.sh | 0 play_workstation.sh | 5 ++++ .../files}/dotfiles/alacritty.yml | 0 {files => playbooks/files}/dotfiles/gitconfig | 0 .../files}/dotfiles/shellconfig/aliases.sh | 0 .../files}/dotfiles/shellconfig/common.sh | 0 .../dotfiles/shellconfig/environment.sh | 0 .../files}/dotfiles/shellconfig/functions.sh | 0 {files => playbooks/files}/dotfiles/tmux.conf | 0 {files => playbooks/files}/dotfiles/vimrc | 0 {files => playbooks/files}/dotfiles/zshrc | 0 .../files}/fonts/hack_nerd_font.ttf | Bin playbooks/roles/.empty | 0 .../roles}/alacritty_user/tasks/main.yml | 0 .../roles}/base/tasks/main.yml | 3 ++- playbooks/roles/flatpaks/tasks/main.yml | 22 ++++++++++++++++++ .../roles}/fonts/tasks/main.yml | 0 .../roles}/lsd_user/tasks/main.yml | 0 .../roles}/tmux_user/tasks/main.yml | 0 .../roles}/vim_user/tasks/main.yml | 0 workstation.yml => playbooks/workstation.yml | 1 + 22 files changed, 32 insertions(+), 3 deletions(-) rename roles/.empty => play_server.sh (100%) create mode 100644 play_workstation.sh rename {files => playbooks/files}/dotfiles/alacritty.yml (100%) rename {files => playbooks/files}/dotfiles/gitconfig (100%) rename {files => playbooks/files}/dotfiles/shellconfig/aliases.sh (100%) rename {files => playbooks/files}/dotfiles/shellconfig/common.sh (100%) rename {files => playbooks/files}/dotfiles/shellconfig/environment.sh (100%) rename {files => playbooks/files}/dotfiles/shellconfig/functions.sh (100%) rename {files => playbooks/files}/dotfiles/tmux.conf (100%) rename {files => playbooks/files}/dotfiles/vimrc (100%) rename {files => playbooks/files}/dotfiles/zshrc (100%) rename {files => playbooks/files}/fonts/hack_nerd_font.ttf (100%) create mode 100644 playbooks/roles/.empty rename {roles => playbooks/roles}/alacritty_user/tasks/main.yml (100%) rename {roles => playbooks/roles}/base/tasks/main.yml (97%) create mode 100644 playbooks/roles/flatpaks/tasks/main.yml rename {roles => playbooks/roles}/fonts/tasks/main.yml (100%) rename {roles => playbooks/roles}/lsd_user/tasks/main.yml (100%) rename {roles => playbooks/roles}/tmux_user/tasks/main.yml (100%) rename {roles => playbooks/roles}/vim_user/tasks/main.yml (100%) rename workstation.yml => playbooks/workstation.yml (92%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b2eab53..6717105 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ Run Workstation playbook on fedora: - dnf install -y ansible python3-pip - pip3 install -r ci-requirements.txt - mkdir /tmp/artifacts - - ANSIBLE_CONFIG=$(pwd)/ansible.cfg JUNIT_OUTPUT_DIR=/tmp/artifacts ansible-playbook workstation.yml || (mv /tmp/artifacts/workstation-*.xml report.xml && exit 1) + - bash play_workstation.sh - cp /tmp/artifacts/workstation-*.xml report.xml - ls /tmp/artifacts artifacts: @@ -26,7 +26,7 @@ Run Workstation playbook on ubuntu: - apt-get install -y ansible python3-pip python3-apt - pip3 install -r ci-requirements.txt - mkdir /tmp/artifacts - - ANSIBLE_CONFIG=$(pwd)/ansible.cfg JUNIT_OUTPUT_DIR=/tmp/artifacts ansible-playbook workstation.yml || (mv /tmp/artifacts/workstation-*.xml report.xml && exit 1) + - bash play_workstation.sh - mv /tmp/artifacts/workstation-*.xml report.xml - ls /tmp/artifacts artifacts: diff --git a/roles/.empty b/play_server.sh similarity index 100% rename from roles/.empty rename to play_server.sh diff --git a/play_workstation.sh b/play_workstation.sh new file mode 100644 index 0000000..a609070 --- /dev/null +++ b/play_workstation.sh @@ -0,0 +1,5 @@ +# Install Dependencies +ansible-galaxy collection install community.general + +# Run Playbook +ANSIBLE_CONFIG=$(pwd)/ansible.cfg JUNIT_OUTPUT_DIR=/tmp/artifacts ansible-playbook playbooks/workstation.yml || (mv /tmp/artifacts/workstation-*.xml report.xml && exit 1) diff --git a/files/dotfiles/alacritty.yml b/playbooks/files/dotfiles/alacritty.yml similarity index 100% rename from files/dotfiles/alacritty.yml rename to playbooks/files/dotfiles/alacritty.yml diff --git a/files/dotfiles/gitconfig b/playbooks/files/dotfiles/gitconfig similarity index 100% rename from files/dotfiles/gitconfig rename to playbooks/files/dotfiles/gitconfig diff --git a/files/dotfiles/shellconfig/aliases.sh b/playbooks/files/dotfiles/shellconfig/aliases.sh similarity index 100% rename from files/dotfiles/shellconfig/aliases.sh rename to playbooks/files/dotfiles/shellconfig/aliases.sh diff --git a/files/dotfiles/shellconfig/common.sh b/playbooks/files/dotfiles/shellconfig/common.sh similarity index 100% rename from files/dotfiles/shellconfig/common.sh rename to playbooks/files/dotfiles/shellconfig/common.sh diff --git a/files/dotfiles/shellconfig/environment.sh b/playbooks/files/dotfiles/shellconfig/environment.sh similarity index 100% rename from files/dotfiles/shellconfig/environment.sh rename to playbooks/files/dotfiles/shellconfig/environment.sh diff --git a/files/dotfiles/shellconfig/functions.sh b/playbooks/files/dotfiles/shellconfig/functions.sh similarity index 100% rename from files/dotfiles/shellconfig/functions.sh rename to playbooks/files/dotfiles/shellconfig/functions.sh diff --git a/files/dotfiles/tmux.conf b/playbooks/files/dotfiles/tmux.conf similarity index 100% rename from files/dotfiles/tmux.conf rename to playbooks/files/dotfiles/tmux.conf diff --git a/files/dotfiles/vimrc b/playbooks/files/dotfiles/vimrc similarity index 100% rename from files/dotfiles/vimrc rename to playbooks/files/dotfiles/vimrc diff --git a/files/dotfiles/zshrc b/playbooks/files/dotfiles/zshrc similarity index 100% rename from files/dotfiles/zshrc rename to playbooks/files/dotfiles/zshrc diff --git a/files/fonts/hack_nerd_font.ttf b/playbooks/files/fonts/hack_nerd_font.ttf similarity index 100% rename from files/fonts/hack_nerd_font.ttf rename to playbooks/files/fonts/hack_nerd_font.ttf diff --git a/playbooks/roles/.empty b/playbooks/roles/.empty new file mode 100644 index 0000000..e69de29 diff --git a/roles/alacritty_user/tasks/main.yml b/playbooks/roles/alacritty_user/tasks/main.yml similarity index 100% rename from roles/alacritty_user/tasks/main.yml rename to playbooks/roles/alacritty_user/tasks/main.yml diff --git a/roles/base/tasks/main.yml b/playbooks/roles/base/tasks/main.yml similarity index 97% rename from roles/base/tasks/main.yml rename to playbooks/roles/base/tasks/main.yml index 9d4dc26..f14faeb 100644 --- a/roles/base/tasks/main.yml +++ b/playbooks/roles/base/tasks/main.yml @@ -6,7 +6,8 @@ - bat - wget - git -# - podman + - podman + - flatpak state: present - name: Copy gitconfig base diff --git a/playbooks/roles/flatpaks/tasks/main.yml b/playbooks/roles/flatpaks/tasks/main.yml new file mode 100644 index 0000000..7d4c32e --- /dev/null +++ b/playbooks/roles/flatpaks/tasks/main.yml @@ -0,0 +1,22 @@ +--- +- name: Add the flathub flatpak repository remote + community.general.flatpak_remote: + name: flathub + state: present + flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo + +- name: Install multiple packages + community.general.flatpak: + name: + - org.gimp.GIMP + - org.telegram.desktop + - net.christianbeier.Gromit-MPX + - md.obsidian.Obsidian + - com.bitwarden.desktop + - com.github.tchx84.Flatseal + - com.github.alexr4535.siglo + - com.nextcloud.desktopclient.nextcloud + - com.github.unrud.VideoDownloader + - fyi.zoey.Boop-GTK + - nl.hjdskes.gcolor3 + state: present diff --git a/roles/fonts/tasks/main.yml b/playbooks/roles/fonts/tasks/main.yml similarity index 100% rename from roles/fonts/tasks/main.yml rename to playbooks/roles/fonts/tasks/main.yml diff --git a/roles/lsd_user/tasks/main.yml b/playbooks/roles/lsd_user/tasks/main.yml similarity index 100% rename from roles/lsd_user/tasks/main.yml rename to playbooks/roles/lsd_user/tasks/main.yml diff --git a/roles/tmux_user/tasks/main.yml b/playbooks/roles/tmux_user/tasks/main.yml similarity index 100% rename from roles/tmux_user/tasks/main.yml rename to playbooks/roles/tmux_user/tasks/main.yml diff --git a/roles/vim_user/tasks/main.yml b/playbooks/roles/vim_user/tasks/main.yml similarity index 100% rename from roles/vim_user/tasks/main.yml rename to playbooks/roles/vim_user/tasks/main.yml diff --git a/workstation.yml b/playbooks/workstation.yml similarity index 92% rename from workstation.yml rename to playbooks/workstation.yml index ed8e05e..021d304 100644 --- a/workstation.yml +++ b/playbooks/workstation.yml @@ -9,3 +9,4 @@ - vim_user - alacritty_user - lsd_user + - flatpaks