From cf041f9747b2eaec29e5a9c05a08bcf12fb1a6fd Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Fri, 24 Nov 2023 22:48:40 +0000 Subject: [PATCH] Add rpmfusion role on Fedora --- playbooks/LinuxCLI.yaml | 4 ++++ roles/rpmfusion/tasks/main.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 roles/rpmfusion/tasks/main.yaml diff --git a/playbooks/LinuxCLI.yaml b/playbooks/LinuxCLI.yaml index 2efc358..d77748a 100644 --- a/playbooks/LinuxCLI.yaml +++ b/playbooks/LinuxCLI.yaml @@ -1,4 +1,8 @@ --- +- hosts: localhost + roles: + - role: rpmfusion + when: ansible_os_family == 'RedHat' and ansible_distribution == 'Fedora' - import_playbook: UnixCLI.yaml - hosts: localhost roles: diff --git a/roles/rpmfusion/tasks/main.yaml b/roles/rpmfusion/tasks/main.yaml new file mode 100644 index 0000000..50f7ff6 --- /dev/null +++ b/roles/rpmfusion/tasks/main.yaml @@ -0,0 +1,31 @@ +--- +- assert: + that: ansible_os_family == 'RedHat' and ansible_distribution == 'Fedora' + +- name: install rpm fusion free gpg key + become: true + rpm_key: + key: 'https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-free-fedora-2020' + state: present + +- name: install rpmfusion free repository + become: true + dnf: + name: + 'https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-{{ansible_distribution_major_version}}.noarch.rpm' + state: present + validate_certs: no + +- name: install rpmfusion non-free gpg key + become: true + rpm_key: + key: 'https://rpmfusion.org/keys?action=AttachFile&do=get&target=RPM-GPG-KEY-rpmfusion-nonfree-fedora-2020' + state: present + +- name: install rpmfusion non-free repository + become: true + dnf: + name: + 'https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ansible_distribution_major_version}}.noarch.rpm' + state: present + validate_certs: no