Install Sublime Text on Debian and Archlinux (x86_64)
This commit is contained in:
parent
1273c2298b
commit
17b61d3665
3 changed files with 74 additions and 24 deletions
|
@ -1,27 +1,26 @@
|
||||||
---
|
---
|
||||||
# tasks file for jotbe.dev-tools
|
# tasks file for jotbe.dev-tools
|
||||||
- name: Provide dev-tools
|
- name: Provide dev-tools (on Debian)
|
||||||
block:
|
include_tasks:
|
||||||
- name: Add key for Sublime Text repo
|
file: sublime_text_debian.yml
|
||||||
apt_key:
|
apply:
|
||||||
url: https://download.sublimetext.com/sublimehq-pub.gpg
|
tags:
|
||||||
state: present
|
- sublime_text
|
||||||
|
|
||||||
- name: Add repository for Sublime Text
|
|
||||||
apt_repository:
|
|
||||||
repo: deb https://download.sublimetext.com/ apt/stable/
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: Update apt cache
|
|
||||||
apt:
|
|
||||||
update_cache: yes
|
|
||||||
cache_valid_time: 7200
|
|
||||||
|
|
||||||
- name: Install Sublime Text
|
|
||||||
apt:
|
|
||||||
pkg:
|
|
||||||
- sublime-text
|
|
||||||
register: sublime_text_installed
|
|
||||||
|
|
||||||
when: ansible_facts['os_family'] == 'Debian'
|
when: ansible_facts['os_family'] == 'Debian'
|
||||||
become: yes
|
|
||||||
|
- name: Provide dev-tools (on Debian)
|
||||||
|
include_tasks:
|
||||||
|
file: sublime_text_debian.yml
|
||||||
|
apply:
|
||||||
|
tags:
|
||||||
|
- sublime_text
|
||||||
|
when: ansible_facts['os_family'] == 'Debian'
|
||||||
|
|
||||||
|
- name: Provide dev-tools (on Archlinux)
|
||||||
|
include_tasks:
|
||||||
|
file: sublime_text_archlinux.yml
|
||||||
|
apply:
|
||||||
|
tags:
|
||||||
|
- sublime_text
|
||||||
|
when:
|
||||||
|
- ansible_facts['os_family'] == 'Archlinux'
|
||||||
|
|
27
tasks/sublime_text_archlinux.yml
Normal file
27
tasks/sublime_text_archlinux.yml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
- name: Install Sublime Text (on Archlinux)
|
||||||
|
block:
|
||||||
|
- name: Add key for Sublime Text repo
|
||||||
|
shell:
|
||||||
|
cmd: |
|
||||||
|
curl -O https://download.sublimetext.com/sublimehq-pub.gpg && \
|
||||||
|
sudo pacman-key --add sublimehq-pub.gpg && sudo pacman-key --lsign-key 8A8F901A && \
|
||||||
|
rm sublimehq-pub.gpg
|
||||||
|
|
||||||
|
- name: Add repository for Sublime Text
|
||||||
|
blockinfile:
|
||||||
|
path: /etc/pacman.conf
|
||||||
|
block: |
|
||||||
|
[sublime-text]
|
||||||
|
Server = https://download.sublimetext.com/arch/dev/x86_64
|
||||||
|
|
||||||
|
- name: Install Sublime Text
|
||||||
|
pacman:
|
||||||
|
name: sublime-text
|
||||||
|
state: latest
|
||||||
|
update_cache: yes
|
||||||
|
register: sublime_text_installed
|
||||||
|
|
||||||
|
when:
|
||||||
|
- ansible_architecture == 'x86_64'
|
||||||
|
become: yes
|
24
tasks/sublime_text_debian.yml
Normal file
24
tasks/sublime_text_debian.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
- name: Install Sublime Text (on Debian)
|
||||||
|
block:
|
||||||
|
- 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: Update apt cache
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
cache_valid_time: 7200
|
||||||
|
|
||||||
|
- name: Install Sublime Text
|
||||||
|
apt:
|
||||||
|
pkg:
|
||||||
|
- sublime-text
|
||||||
|
register: sublime_text_installed
|
||||||
|
become: true
|
Loading…
Add table
Reference in a new issue