From f1e4bc489838de9b8eea779c2b5bf5057be04daa Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 17 Oct 2020 13:08:55 +0200 Subject: [PATCH 1/5] Add `-K` switch to Makefile Closes #20 Signed-off-by: Matej Focko --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d3ed7cc..2f34359 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: fedora-deps deps fedora-bootstrap gpg keys ANSIBLE_PYTHON := /usr/bin/python3 -AP := ansible-playbook -vv -c local -i localhost, -e ansible_python_interpreter=$(ANSIBLE_PYTHON) +AP := ansible-playbook -vv -K -c local -i localhost, -e ansible_python_interpreter=$(ANSIBLE_PYTHON) fedora-bootstrap: $(AP) playbooks/fedora.yml @@ -16,4 +16,4 @@ gpg: bash scripts/generate_gpg.sh keys: - bash scripts/export_keys.sh \ No newline at end of file + bash scripts/export_keys.sh -- 2.45.2 From 0b7969ad007654d8d4e8b42afac232918a8bb374 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 17 Oct 2020 13:12:22 +0200 Subject: [PATCH 2/5] Switch `mkdir` from shell to file/directory Closes #21 Signed-off-by: Matej Focko --- playbooks/roles/haskell/tasks/main.yml | 4 +++- playbooks/roles/shell/tasks/nvim.yml | 4 +++- playbooks/roles/shell/tasks/tmux.yml | 4 +++- playbooks/roles/vscode/tasks/main.yml | 11 +++++++---- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/playbooks/roles/haskell/tasks/main.yml b/playbooks/roles/haskell/tasks/main.yml index 752e25d..3c4dcd5 100644 --- a/playbooks/roles/haskell/tasks/main.yml +++ b/playbooks/roles/haskell/tasks/main.yml @@ -1,6 +1,8 @@ --- - name: Create directories for configuration - shell: mkdir ~/.ghc + file: + path: ~/.ghc + state: directory - name: Install ghci.conf template: diff --git a/playbooks/roles/shell/tasks/nvim.yml b/playbooks/roles/shell/tasks/nvim.yml index 8cd285d..6a75288 100644 --- a/playbooks/roles/shell/tasks/nvim.yml +++ b/playbooks/roles/shell/tasks/nvim.yml @@ -1,7 +1,9 @@ --- - name: Create init.vim block: - - shell: mkdir -p ~/.config/nvim + - file: + path: ~/.config/nvim + state: directory - template: src: templates/init.vim.j2 dest: ~/.config/nvim/init.vim diff --git a/playbooks/roles/shell/tasks/tmux.yml b/playbooks/roles/shell/tasks/tmux.yml index c979a03..638da20 100644 --- a/playbooks/roles/shell/tasks/tmux.yml +++ b/playbooks/roles/shell/tasks/tmux.yml @@ -1,6 +1,8 @@ --- - name: Create .tmux - shell: mkdir -p ~/.tmux + file: + path: ~/.tmux + state: directory - name: Clone tpm git: diff --git a/playbooks/roles/vscode/tasks/main.yml b/playbooks/roles/vscode/tasks/main.yml index 9fbee25..23e19aa 100644 --- a/playbooks/roles/vscode/tasks/main.yml +++ b/playbooks/roles/vscode/tasks/main.yml @@ -1,9 +1,12 @@ --- - name: Create directories for VSCode - block: - - shell: mkdir -p ~/.local/bin - - shell: mkdir -p ~/.local/share - - shell: mkdir -p "$HOME/.config/Code - Insiders/User" + file: + path: {{ item }} + state: directory + loop: + - ~/.local/bin + - ~/.local/share + - "$HOME/.config/Code - Insiders/User" - name: Install VSCode script template: -- 2.45.2 From 0736d64ecca7bea16ed1510e191c8a151fcea3e0 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 17 Oct 2020 13:16:23 +0200 Subject: [PATCH 3/5] Include distribution in ssh key name Closes #19 Signed-off-by: Matej Focko --- playbooks/roles/ssh/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/ssh/tasks/main.yml b/playbooks/roles/ssh/tasks/main.yml index 88f7d0b..7e53429 100644 --- a/playbooks/roles/ssh/tasks/main.yml +++ b/playbooks/roles/ssh/tasks/main.yml @@ -4,7 +4,7 @@ name: mfocko generate_ssh_key: yes ssh_key_type: ed25519 - ssh_key_comment: "$HOSTNAME" + ssh_key_comment: "$HOSTNAME-{{ ansible_facts['distribution'] }}" - name: Install SSH config template: @@ -15,4 +15,4 @@ - name: Enable sshd systemd: name: sshd - enabled: yes \ No newline at end of file + enabled: yes -- 2.45.2 From c52ced59e53e8ae0543fc8ba2f9eb1cddf459bb3 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 17 Oct 2020 13:23:29 +0200 Subject: [PATCH 4/5] Install Nord for Konsole by default Closes #22 Signed-off-by: Matej Focko --- playbooks/roles/shell/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/playbooks/roles/shell/tasks/main.yml b/playbooks/roles/shell/tasks/main.yml index e95abf5..7802987 100644 --- a/playbooks/roles/shell/tasks/main.yml +++ b/playbooks/roles/shell/tasks/main.yml @@ -6,6 +6,9 @@ name: mfocko shell: /bin/zsh +- name: Install Nord theme for Konsole + shell: wget -O ~/.local/share/konsole/nord.colorscheme https://raw.githubusercontent.com/arcticicestudio/nord-konsole/develop/src/nord.colorscheme + - include: nvim.yml - include: emacs.yml - include: zsh.yml -- 2.45.2 From bf1cce91fab18a97cf2ef1d0a2b617438ec6f5ce Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sat, 17 Oct 2020 13:41:25 +0200 Subject: [PATCH 5/5] Install RPMFusion RPMs and fix warning for VSCode Closes #18 Signed-off-by: Matej Focko --- playbooks/roles/fedora/repositories/tasks/main.yml | 11 +++++++++++ playbooks/roles/vscode/tasks/main.yml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/fedora/repositories/tasks/main.yml b/playbooks/roles/fedora/repositories/tasks/main.yml index 3cf6008..05847fe 100644 --- a/playbooks/roles/fedora/repositories/tasks/main.yml +++ b/playbooks/roles/fedora/repositories/tasks/main.yml @@ -1,4 +1,15 @@ --- +- name: Get version of Fedora + shell: rpm -E %fedora + register: fedora_version + +- name: Install RPMFusion RPMs with GPG keys + dnf: + name: + - "https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ fedora_version.stdout }}.noarch.rpm" + - "https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ fedora_version.stdout }}.noarch.rpm" + state: present + - name: Install Google Chrome repository template: src: templates/google-chrome.repo.j2 diff --git a/playbooks/roles/vscode/tasks/main.yml b/playbooks/roles/vscode/tasks/main.yml index 23e19aa..0d8636d 100644 --- a/playbooks/roles/vscode/tasks/main.yml +++ b/playbooks/roles/vscode/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Create directories for VSCode file: - path: {{ item }} + path: "{{ item }}" state: directory loop: - ~/.local/bin -- 2.45.2