From ed3d6d9b828167c9843fcdea8096ea4205af1ffe Mon Sep 17 00:00:00 2001 From: Samir Jha Date: Tue, 17 Dec 2024 14:30:07 +0000 Subject: [PATCH] Fixes #38109 - As a user, I want to install flatpaks on remote hosts --- .../foreman/job_templates/flatpak_setup.erb | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 app/views/foreman/job_templates/flatpak_setup.erb diff --git a/app/views/foreman/job_templates/flatpak_setup.erb b/app/views/foreman/job_templates/flatpak_setup.erb new file mode 100644 index 00000000000..96f61a008dc --- /dev/null +++ b/app/views/foreman/job_templates/flatpak_setup.erb @@ -0,0 +1,37 @@ +<%# +kind: job_template +name: Install Flatpak and Firefox +job_category: Katello +description_format: 'Install Flatpak and Firefox' +feature: katello_host_flatpak_install +provider_type: script +template_inputs: +- name: Flatpak registry URL + description: URL of server/capsule + input_type: user + required: true +- name: Username + description: Username for container registry login + input_type: user + required: true +- name: Password + description: Password for container registry login + input_type: user + required: true +- name: Remote Name + description: Remote name for Flatpak + input_type: user + required: true +%> + +<% + remote_name = input('Remote Name') + server_url = input('Flatpak registry URL') + username = input('Username') + password = input('Password') +%> + +flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci <%= remote_name %> oci+<%= server_url %>/ +podman login <%= server_url %> --username <%= username %> --password <%= password %> +cp /run/containers/0/auth.json /etc/flatpak/oci-auth.json +flatpak install firefox --assumeyes \ No newline at end of file