mirror of
https://github.com/famedly/ansible-collection-services
synced 2024-11-12 23:07:07 +00:00
feat(drivestrike): add role to install on archlinux
This commit is contained in:
parent
63bdce3f34
commit
9476a8df61
3 changed files with 58 additions and 0 deletions
11
roles/drivestrike/defaults/main.yml
Normal file
11
roles/drivestrike/defaults/main.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
|
||||
drivestrike_package_name: drivestrike
|
||||
drivestrike_package_name_arch: "{{ drivestrike_package_name }}"
|
||||
|
||||
drivestrike_arch_pubkey_url: "https://app.drivestrike.com/static/drivestrike.pubkey.txt"
|
||||
drivestrike_arch_pubkey_file: "/tmp/drivestrike.pub"
|
||||
drivestrike_arch_pubkey_id: 6B48829B
|
||||
drivestrike_arch_pubkey_fingerprint: A9CA32527A44BC385FCAEF85441FF83A6B48829B
|
||||
drivestrike_arch_repo_server_url: "https://app.drivestrike.com/static/arch"
|
||||
drivestrike_arch_pacman_config_file: /etc/pacman.conf
|
42
roles/drivestrike/tasks/install-Archlinux.yml
Normal file
42
roles/drivestrike/tasks/install-Archlinux.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
|
||||
- name: Ensure dependencies are installed
|
||||
pacman:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop:
|
||||
- gnupg
|
||||
|
||||
- name: Retrieve pacman repository key
|
||||
uri:
|
||||
method: GET
|
||||
url: "{{ drivestrike_arch_pubkey_url }}"
|
||||
dest: "{{ drivestrike_arch_pubkey_file }}"
|
||||
register: drivestrik_pub_key_download
|
||||
|
||||
- name: Import drivestrike public key
|
||||
community.general.pacman_key:
|
||||
id: "{{ drivestrike_arch_pubkey_fingerprint }}"
|
||||
file: "{{ drivestrike_arch_pubkey_file }}"
|
||||
verify: true
|
||||
state: present
|
||||
when: drivestrik_pub_key_download.changed
|
||||
|
||||
- name: Configure pacman for external repositoy
|
||||
blockinfile:
|
||||
dest: "{{ drivestrike_arch_pacman_config_file }}"
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK by famedly.services.drivestrike"
|
||||
block: |+2
|
||||
[drivestrike]
|
||||
SigLevel = Required DatabaseOptional
|
||||
Server = {{ drivestrike_arch_repo_server_url }}
|
||||
|
||||
- name: Update pacman cache
|
||||
pacman:
|
||||
update_cache: true
|
||||
when: drivestrik_pub_key_download.changed
|
||||
|
||||
- name: Install drivestrike package
|
||||
pacman:
|
||||
name: "{{ drivestrike_package_name_arch }}"
|
||||
state: present
|
5
roles/drivestrike/tasks/main.yml
Normal file
5
roles/drivestrike/tasks/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
|
||||
- name: Install drivestrike
|
||||
include_tasks:
|
||||
file: "install-{{ ansible_os_family }}.yml"
|
Loading…
Reference in a new issue