1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_weechat.git synced 2024-08-16 13:09:48 +02:00
ansible_role_weechat/tasks/install-debian.yml
2023-10-30 01:59:23 +01:00

69 lines
1.6 KiB
YAML

---
- name: Update apt cache
become: true
ansible.builtin.apt:
cache_valid_time: 3600
update_cache: true
when:
- ansible_pkg_mgr == "apt"
- name: Install apt-transport-https
become: true
ansible.builtin.apt:
name: "{{ item }}"
state: 'present'
loop:
- 'apt-transport-https'
- 'gpg'
- name: Add weechat repository gpg-key
become: true
ansible.builtin.apt_key:
keyserver: 'keys.openpgp.org'
id: "{{ weechat__gpg_id }}"
state: 'present'
- name: Create /usr/share/keyrings directory
become: true
ansible.builtin.file:
path: '/usr/share/keyrings'
state: 'directory'
owner: 'root'
group: 'root'
mode: '0755'
- name: Import WeeChat GPG key
become: true
ansible.builtin.apt_key:
keyserver: "hkps://keys.openpgp.org"
id: "{{ weechat__gpg_id }}"
keyring: '/usr/share/keyrings/weechat-archive-keyring.gpg'
state: 'present'
- name: Add weechat repo
become: true
ansible.builtin.apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/weechat-archive-keyring.gpg] {{ weechat__debian_weechat_repo }}"
state: 'present'
update_cache: true
- name: Add weechat repo-src
become: true
ansible.builtin.apt_repository:
repo: "deb-src [signed-by=/usr/share/keyrings/weechat-archive-keyring.gpg] {{ weechat__debian_weechat_repo }}"
state: 'present'
update_cache: true
- name: Install recomended weechat packages
become: true
ansible.builtin.apt:
name: "{{ item }}"
state: 'present'
loop:
- 'weechat-curses'
- 'weechat-plugins'
- 'weechat-python'
- 'weechat-perl'
- 'weechat-lua'
- 'weechat-ruby'
- 'weechat-doc'