@@ -1263,6 +1263,8 @@ def exec_service(service, command, failonerror=True):
1263
1263
install_katello_agent ()
1264
1264
API_PORT = get_api_port ()
1265
1265
smart_proxy_id = return_matching_foreman_key ('smart_proxies' , 'name="%s"' % options .foreman_fqdn , 'id' , False )
1266
+ puppet_master_smart_proxy_id = return_matching_foreman_key ('smart_proxies' , 'name="%s"' % options .puppet_server , 'id' , True )
1267
+ puppet_ca_smart_proxy_id = return_matching_foreman_key ('smart_proxies' , 'name="%s"' % options .puppet_ca_server , 'id' , True )
1266
1268
current_host_id = return_matching_foreman_key ('hosts' , 'name="%s"' % FQDN , 'id' , False )
1267
1269
capsule_features = get_capsule_features (smart_proxy_id )
1268
1270
@@ -1276,9 +1278,10 @@ def exec_service(service, command, failonerror=True):
1276
1278
1277
1279
# Configure new proxy_id for Puppet (if not skipped), and OpenSCAP (if available and not skipped)
1278
1280
if 'foreman' not in options .skip and 'puppet' not in options .skip :
1279
- print_running ("Calling Foreman API to update Puppet master and Puppet CA for %s to %s" % (FQDN , options .foreman_fqdn ))
1280
- update_host_capsule_mapping ("puppet_proxy_id" , smart_proxy_id , current_host_id )
1281
- update_host_capsule_mapping ("puppet_ca_proxy_id" , smart_proxy_id , current_host_id )
1281
+ print_running ("Calling Foreman API to update Puppet Master for %s to %s" % (FQDN , options .puppet_server ))
1282
+ update_host_capsule_mapping ("puppet_proxy_id" , puppet_master_smart_proxy_id , current_host_id )
1283
+ print_running ("Calling Foreman API to update Puppet CA for %s to %s" % (FQDN , options .puppet_ca_server ))
1284
+ update_host_capsule_mapping ("puppet_ca_proxy_id" , puppet_ca_smart_proxy_id , current_host_id )
1282
1285
if 'foreman' not in options .skip and 'Openscap' in capsule_features :
1283
1286
print_running ("Calling Foreman API to update OpenSCAP proxy for %s to %s" % (FQDN , options .foreman_fqdn ))
1284
1287
update_host_capsule_mapping ("openscap_proxy_id" , smart_proxy_id , current_host_id )
0 commit comments