Project

Profile

Help

Story #3721

Updated by bmbouter over 6 years ago

h3. Overall Behaviors 

 If a user supplies a settings.py file it is overwritten on all target machines. The user is assumed to know what they are doing. The file provided by the user is never modified. 

 If the user does nothing a settings.py containing a generated SECRET_KEY is placed on the target systems. This is a sparse file, it is not the fully commented file. If a settings.py already exists, there no changes are ever made. This ensures idempotent behavior. 

 h3. Technical Implementation 

 <pre> 
 If `pulp3_settings_source_path` is defined: 
     Install file to `server_settings_target_path | default('/etc/pulp/settings.yaml')` on target host. 
     Don't alter the file that's being copied to the target host. (i.e. don't insert a SECRET_KEY) 
 Else: 
     If `server_settings_target_path | default('/etc/pulp/settings.yaml')` exists on the target host: 
         Do nothing. 
     Else: 
         Create `server_settings_target_path | default('/etc/pulp/settings.yaml')` on target host. 
         Make sure to insert SECRET_KEY into file. 
 </pre> 

 h3. h2. Notes 

 * server.yaml is required due to SECRET_KEY 
 * we don't want to fully template server.yaml. Fully templating would mean that for every update to Pulp's settings file syntax, there would need to be a corresponding update to this Ansible role.

Back