From cec0d7cd8c03df89c6fcbe1dd4469355e27541a9 Mon Sep 17 00:00:00 2001 From: Jan Beilicke Date: Sat, 28 Nov 2020 20:22:16 +0000 Subject: [PATCH] Provide dev-tools with APT on Debian targets only, with privilege escalation --- tasks/main.yml | 65 ++++++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 16a83f4..9d9104a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,39 +1,42 @@ --- # tasks file for jotbe.dev-tools +- name: Provide dev-tools + block: + - name: Add key for Sublime Text repo + apt_key: + url: https://download.sublimetext.com/sublimehq-pub.gpg + state: present -- name: Add key for Sublime Text repo - apt_key: - url: https://download.sublimetext.com/sublimehq-pub.gpg - state: present + - name: Add repository for Sublime Text + apt_repository: + repo: deb https://download.sublimetext.com/ apt/stable/ + state: present -- name: Add repository for Sublime Text - apt_repository: - repo: deb https://download.sublimetext.com/ apt/stable/ - state: present + - name: Add key for VSCodium repo + apt_key: + url: https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg + state: present -- name: Add key for VSCodium repo - apt_key: - url: https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg - state: present + - name: Add repository for VSCodium + apt_repository: + repo: deb https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/repos/debs/ vscodium main + state: present -- name: Add repository for VSCodium - apt_repository: - repo: deb https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/repos/debs/ vscodium main - state: present + - name: Update apt cache + apt: + update_cache: yes + cache_valid_time: 7200 -- name: Update apt cache - apt: - update_cache: yes - cache_valid_time: 7200 + - name: Install Sublime Text + apt: + pkg: + - sublime-text + register: sublime_text_installed -- name: Install Sublime Text - apt: - pkg: - - sublime-text - register: sublime_text_installed - -- name: Install VSCodium - apt: - pkg: - - codium - register: vscodium_installed + - name: Install VSCodium + apt: + pkg: + - codium + register: vscodium_installed + when: ansible_facts['os_family'] == 'Debian' + become: yes \ No newline at end of file