Add Linux Mint support to llvm role
This commit is contained in:
parent
368982b8fa
commit
39268ae7aa
2
roles/llvm/tasks/Linux Mint.yaml
Normal file
2
roles/llvm/tasks/Linux Mint.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
- include_tasks: Ubuntu.yaml
|
@ -4,14 +4,27 @@
|
|||||||
url: https://api.github.com/repos/llvm/llvm-project/releases/latest
|
url: https://api.github.com/repos/llvm/llvm-project/releases/latest
|
||||||
register: llvm_latest
|
register: llvm_latest
|
||||||
|
|
||||||
|
- name: read /etc/os-release
|
||||||
|
slurp:
|
||||||
|
src: /etc/os-release
|
||||||
|
register: os_release_b64
|
||||||
|
- name: extract UBUNTU_CODENAME=<name> to support dirivitive distros
|
||||||
|
set_fact:
|
||||||
|
ubuntu_codename: >-
|
||||||
|
{{
|
||||||
|
os_release_b64.content | b64decode |
|
||||||
|
regex_search('UBUNTU_CODENAME=.*') |
|
||||||
|
replace('UBUNTU_CODENAME=', '')
|
||||||
|
}}
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
llvm_major_version:
|
llvm_major_version:
|
||||||
'{{llvm_latest.json.tag_name[8:llvm_latest.json.tag_name.find(".")]}}'
|
'{{llvm_latest.json.tag_name[8:llvm_latest.json.tag_name.find(".")]}}'
|
||||||
- set_fact:
|
- set_fact:
|
||||||
llvm_apt_repo_url:
|
llvm_apt_repo_url:
|
||||||
'http://apt.llvm.org/{{ansible_distribution_release}}/'
|
'http://apt.llvm.org/{{ubuntu_codename}}/'
|
||||||
llvm_apt_category:
|
llvm_apt_category:
|
||||||
'llvm-toolchain-{{ansible_distribution_release}}-{{llvm_major_version}}'
|
'llvm-toolchain-{{ubuntu_codename}}-{{llvm_major_version}}'
|
||||||
|
|
||||||
- name: add upstream deb repository
|
- name: add upstream deb repository
|
||||||
become: true
|
become: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user