This role installs VS-Code or VS-Codium on a Linux PC. You can install at different Systems:
- Debian and Debian like
- Red Hat and Red Hat like (not tested)
- Raspberry Pi OS
Entry Point task/main.yml
make your decision what to install
load the extensions from the /vars/*.extensions.yml file prepare it for installation ready to use in a Dictionary: extensions_var
file: tasks/prepare_extensions_to_install.yml
generates a var userlist with all users from each hosts.
userlist:
- host_name: host1
users: ['user1_host1', 'user2_host1', 'user3_host1']
- host_name: host2
users: ['user1_host2', 'user2_host2']
gather user from all hosts and saves in userlist there will will be a file in /var/userlist.yml with the userlist it is a workaround because i dont know how to save the users in the way i need it
file: tasks/prepare_host_to_install.yml
get the OS-System an save it in a boolean Var
install VS-Code oder VS-Codium inclusive the Extensions for each user.
/vars/username.extensions.yml
vscode_extensions_for:
- username: username
extensions:
- identifier of the extension
- ...
- hosts: workstations
roles:
- vscode_codium
-
at vars/user.extensions.yml
- add user decision vs-code or vs-codium
- change user into a list of users
-
test the role on a RHEL-System
CC 4.0 by
Andreas Vonrhein. Teacher at professional school for IT & construction technology