File tree Expand file tree Collapse file tree 4 files changed +46
-3
lines changed Expand file tree Collapse file tree 4 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 19
19
dest : /opt/kayobe/containers/pulp/settings.py
20
20
mode : 0644
21
21
become : true
22
+
23
+ - name : Configure TLS for local Pulp
24
+ when : pulp_enable_tls | bool
25
+ become : true
26
+ block :
27
+ - name : Ensure /opt/kayobe/containers/pulp/certs exists
28
+ file :
29
+ path : " /opt/kayobe/containers/pulp/certs"
30
+ state : directory
31
+
32
+ - name : Copy TLS cert and key into container directory
33
+ template :
34
+ src : " {{ item.src }}"
35
+ dest : " /opt/kayobe/containers/pulp/certs/{{ item.dest }}"
36
+ mode : 0644
37
+ become : true
38
+ loop :
39
+ - src : " {{ pulp_cert_path }}"
40
+ dest : ' pulp_webserver.crt'
41
+ - src : " {{ pulp_key_path }}"
42
+ dest : ' pulp_webserver.key'
Original file line number Diff line number Diff line change 1
1
---
2
2
# ##############################################################################
3
- # Local Pulp access credentials
3
+ # Local Pulp server configuration
4
4
5
5
# Base URL of the local Pulp service.
6
6
# Default uses the seed node's IP on the admin network.
7
- pulp_url : " http://{{ admin_oc_net_name | net_ip(groups['seed'][0]) }}:80"
7
+ pulp_url : " {{ 'https' if pulp_enable_tls | bool else 'http' }}://{{ admin_oc_net_name | net_ip(groups['seed'][0]) }}:{{ pulp_port }}"
8
+
9
+ # Port on the seed node's interface on the admin network that the Pulp service
10
+ # listens on.
11
+ pulp_port : " {{ '443' if pulp_enable_tls | bool else '80' }}"
12
+
13
+ # Whether to enable TLS for Pulp.
14
+ pulp_enable_tls : false
15
+
16
+ # Path to a TLS certificate to use when TLS is enabled.
17
+ # pulp_cert_path:
18
+
19
+ # Path to a TLS key to use when TLS is enabled.
20
+ # pulp_key_path:
21
+
22
+ # ##############################################################################
23
+ # Local Pulp access credentials
8
24
9
25
# Credentials used to access the local Pulp REST API.
10
26
pulp_username : admin
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ seed_pulp_container:
106
106
image : pulp/pulp
107
107
pre : " {{ kayobe_config_path }}/containers/pulp/pre.yml"
108
108
post : " {{ kayobe_config_path }}/containers/pulp/post.yml"
109
- tag : " 3.21"
109
+ tag : " {{ ' 3.21-https' if pulp_enable_tls | bool else '3.21' }} "
110
110
network_mode : host
111
111
# Override deploy_containers_defaults.init == true to ensure
112
112
# s6-overlay-suexec starts as pid 1
Original file line number Diff line number Diff line change
1
+ ---
2
+ features :
3
+ - |
4
+ Enable TLS for the Seed Pulp service. Set ``pulp_enable_tls: true`` and
5
+ provide paths to a TLS certificate and key using ``pulp_cert_path`` and
6
+ ``pulp_key_path`` respectively.
You can’t perform that action at this time.
0 commit comments