-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #38109 - As a user, I want to install flatpaks on remote hosts
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<%# | ||
kind: job_template | ||
name: Install Flatpak application on host | ||
job_category: Katello | ||
description_format: 'Install Flatpak application on host' | ||
provider_type: script | ||
template_inputs: | ||
- name: Flatpak remote name | ||
description: Name of remote to use on host | ||
input_type: user | ||
required: false | ||
- name: Application name | ||
description: Name of the application to install | ||
input_type: user | ||
required: true | ||
%> | ||
|
||
<% | ||
remote_name = input('Flatpak remote name') | ||
app_name = input('Application name') | ||
%> | ||
|
||
sudo dbus-launch flatpak install <%= remote_name %> <%= app_name %> --assumeyes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |