Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #38109 - As a user, I want to install flatpaks on remote hosts via REX #11264

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions app/views/foreman/job_templates/flatpak_setup.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<%#
kind: job_template
name: Setup Flatpak remote on host
job_category: Katello
description_format: 'Setup Flatpak remote on host'
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/Access token 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')
%>

sudo flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci <%= remote_name %> oci+<%= server_url %>/
sudo podman login <%= server_url %> --username <%= username %> --password <%= password %>
sudo cp /run/containers/0/auth.json /etc/flatpak/oci-auth.json
Loading