copr-backend: configure an access to a Pulp instance
This commit is contained in:
parent
34ef8be9ff
commit
ad3d1a3a54
3 changed files with 68 additions and 0 deletions
|
@ -371,6 +371,12 @@
|
|||
- config
|
||||
- aws_config
|
||||
|
||||
- name: setup Pulp
|
||||
import_tasks: "pulp.yml"
|
||||
tags:
|
||||
- config
|
||||
- pulp
|
||||
|
||||
- name: copr-ping-account
|
||||
import_tasks: copr-ping.yml
|
||||
tags: copr_ping
|
||||
|
|
33
roles/copr/backend/tasks/pulp.yml
Normal file
33
roles/copr/backend/tasks/pulp.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
# We don't rely on the pulp-cli tool but it will be helpful for operations
|
||||
# The package is available only on F40+
|
||||
# - name: install pulp-cli
|
||||
# dnf: state=present name=pulp-cli
|
||||
|
||||
- name: Create pulp config directory
|
||||
file:
|
||||
state: directory
|
||||
path: /home/copr/.config/pulp/
|
||||
owner: copr
|
||||
group: copr
|
||||
mode: 0700
|
||||
|
||||
- name: Install Pulp auth certificates
|
||||
copy:
|
||||
src: "{{ private }}/files/copr/pulp/{{ name }}"
|
||||
dest: "/home/copr/.config/pulp/"
|
||||
owner: copr
|
||||
group: copr
|
||||
mode: 0600
|
||||
with_items:
|
||||
- copr-pulp-prod.crt
|
||||
- copr-pulp-prod.key
|
||||
when: env == "production"
|
||||
|
||||
- name: Install Pulp config file
|
||||
template:
|
||||
src: pulp-cli.toml
|
||||
dest: "{{ item.homedir }}/.aws/config"
|
||||
owner: copr
|
||||
group: copr
|
||||
mode: 0600
|
29
roles/copr/backend/templates/pulp-cli.toml
Normal file
29
roles/copr/backend/templates/pulp-cli.toml
Normal file
|
@ -0,0 +1,29 @@
|
|||
{% if env == "production" %}
|
||||
[cli]
|
||||
base_url = "https://mtls.internal.console.redhat.com"
|
||||
api_root = "/api/pulp/"
|
||||
username = ""
|
||||
password = ""
|
||||
domain = "public-copr"
|
||||
cert = "/home/copr/.config/pulp/copr-pulp-prod.crt"
|
||||
key = "/home/copr/.config/pulp/copr-pulp-prod.key"
|
||||
verify_ssl = true
|
||||
format = "json"
|
||||
dry_run = false
|
||||
timeout = 0
|
||||
verbose = 0
|
||||
{% else %}
|
||||
[cli]
|
||||
base_url = "https://pulp.stage.devshift.net"
|
||||
api_root = "/api/pulp/"
|
||||
username = "copr"
|
||||
password = "TODO"
|
||||
domain = "copr"
|
||||
cert = ""
|
||||
key = ""
|
||||
verify_ssl = false
|
||||
format = "json"
|
||||
dry_run = false
|
||||
timeout = 0
|
||||
verbose = 0
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue