First commit
This commit is contained in:
commit
630c5a6872
6 changed files with 67 additions and 0 deletions
6
files/yum-vscode.repo
Normal file
6
files/yum-vscode.repo
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
[code]
|
||||||
|
name=Visual Studio Code
|
||||||
|
baseurl=https://packages.microsoft.com/yumrepos/vscode
|
||||||
|
enabled=1
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
|
||||||
28
tasks/add_repo_Debian.yml
Normal file
28
tasks/add_repo_Debian.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
---
|
||||||
|
#- name: Registering Ubuntu VisualStudio Code repository
|
||||||
|
# get_url:
|
||||||
|
# url: https://packages.microsoft.com/config/ubuntu/{{ ansible_distribution_version }}/prod.list
|
||||||
|
# dest: /etc/apt/sources.list.d/microsoft.list
|
||||||
|
# owner: root
|
||||||
|
# group: root
|
||||||
|
# mode: 0644
|
||||||
|
# when:
|
||||||
|
# - ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
|
- name: Registering Debian Powershell repository
|
||||||
|
apt_repository:
|
||||||
|
repo: deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
|
||||||
|
filename: vscode.list
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
mode: 0644
|
||||||
|
# owner: root
|
||||||
|
# group: root
|
||||||
|
# when:
|
||||||
|
# - ansible_distribution == "Debian"
|
||||||
|
|
||||||
|
- name: Install public repository GPG keys
|
||||||
|
apt_key:
|
||||||
|
url: https://packages.microsoft.com/keys/microsoft.asc
|
||||||
|
state: present
|
||||||
|
|
||||||
15
tasks/add_repo_RedHat.yml
Normal file
15
tasks/add_repo_RedHat.yml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
#- name: Registering VisualStudio Code repository
|
||||||
|
# get_url:
|
||||||
|
# url: https://packages.microsoft.com/config/rhel/7/prod.repo
|
||||||
|
# dest: /etc/yum.repos.d/microsoft.repo
|
||||||
|
# owner: root
|
||||||
|
# group: root
|
||||||
|
# mode: 0644
|
||||||
|
#- name: Install Microsoft GPG key
|
||||||
|
# command: rpm --import https://packages.microsoft.com/keys/microsoft.asc
|
||||||
|
- name: Registering VisualStudio Code repository
|
||||||
|
copy: src=yum-vscode.repo dest=/etc/yum.repos.d/vscode.repo owner=root group=root mode=0644
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
10
tasks/main.yml
Normal file
10
tasks/main.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
- name: Include vars for {{ ansible_os_family }}
|
||||||
|
include_vars: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
|
- name: Define repo for {{ ansible_os_family }}
|
||||||
|
include_tasks: add_repo_{{ ansible_os_family }}.yml
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
package: name='{{ vscode_packages }}' state=latest update_cache=yes
|
||||||
|
|
||||||
4
vars/Debian.yml
Normal file
4
vars/Debian.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
vscode_packages:
|
||||||
|
- code
|
||||||
|
|
||||||
4
vars/RedHat.yml
Normal file
4
vars/RedHat.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
vscode_packages:
|
||||||
|
- code
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue