Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions templates/config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,20 @@

# policy (key is id as in Foreman)
{% for policy in foreman_scap_client_policies %}
{{ policy['id'] }}:
:profile: {{ policy['profile_id'] }}
:content_path: {{ policy['content_path']}}
{{ policy.get('id') }}:
{% if 'profile_id' in policy %}
:profile: {{ policy.get('profile_id') }}
{% endif %}
:content_path: {{ policy.get('content_path')}}
# Download path
# A path to download SCAP content from proxy
:download_path: {{ policy['download_path'] }}
:tailoring_path: {{ policy['tailoring_path'] }}
:tailoring_download_path: {{ policy['tailoring_download_path'] }}
{% if 'download_path' in policy %}
:download_path: {{ policy.get('download_path') }}
{% endif %}
{% if 'tailoring_path' in policy %}
:tailoring_path: {{ policy.get('tailoring_path') }}
{% endif %}
{% if 'tailoring_download_path' in policy %}
:tailoring_download_path: {{ policy.get('tailoring_download_path') }}
{% endif %}
{% endfor %}
2 changes: 1 addition & 1 deletion templates/cron.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

# foreman_scap_client cron job
{% for policy in foreman_scap_client_policies %}
{{ policy['minute'] }} {{ policy['hour'] }} {{ policy['monthday'] }} {{ policy['month'] }} {{ policy['weekday'] }} root /bin/sleep {{ foreman_scap_client_cron_splay | random(seed = foreman_scap_client_cron_splay_seed) if foreman_scap_client_cron_splay_seed != '' else foreman_scap_client_cron_splay | random }}; /usr/bin/foreman_scap_client {{ policy['id'] }} 2>&1 | logger -t foreman_scap_client
{{ policy.get('minute') }} {{ policy.get('hour') }} {{ policy.get('monthday') }} {{ policy.get('month') }} {{ policy.get('weekday') }} root /bin/sleep {{ foreman_scap_client_cron_splay | random(seed = foreman_scap_client_cron_splay_seed) if foreman_scap_client_cron_splay_seed != '' else foreman_scap_client_cron_splay | random }}; /usr/bin/foreman_scap_client {{ policy.get('id') }} 2>&1 | logger -t foreman_scap_client
{% endfor %}