Bladeren bron

Merge pull request #179 from arthurlogilab/178-exclude-pat

[users/users_files] add exclude_pat to user files (closes #178)
tags/v0.45.0
Niels Abspoel 6 jaren geleden
bovenliggende
commit
e33c76edb6
No account linked to committer's email address
2 gewijzigde bestanden met toevoegingen van 5 en 0 verwijderingen
  1. +1
    -0
      pillar.example
  2. +4
    -0
      users/user_files.sls

+ 1
- 0
pillar.example Bestand weergeven

@@ -138,6 +138,7 @@ users:
# execution bit for example.
file_mode: keep
sym_mode: 640
exclude_pat: "*.gitignore"

## Absent user
cuser:

+ 4
- 0
users/user_files.sls Bestand weergeven

@@ -12,6 +12,7 @@ include:
{%- set user_files_template = salt['pillar.get'](('users:' ~ username ~ ':user_files:template'), None) -%}
{%- set user_files_file_mode = salt['pillar.get'](('users:' ~ username ~ ':user_files:file_mode'), False) -%}
{%- set user_files_sym_mode = salt['pillar.get'](('users:' ~ username ~ ':user_files:sym_mode'), False) -%}
{%- set user_files_exclude_pat = salt['pillar.get'](('users:' ~ username ~ ':user_files:exclude_pat'), False) -%}
{%- if user_files.enabled -%}

{%- if user_files.source is defined -%}
@@ -47,6 +48,9 @@ users_userfiles_{{ username }}_recursive:
{% if user_files_sym_mode -%}
- sym_mode: {{ user_files_sym_mode }}
{% endif -%}
{% if user_files_exclude_pat -%}
- exclude_pat: "{{ user_files_exclude_pat }}"
{% endif -%}
- include_empty: True
- keep_symlinks: True
- require:

Laden…
Annuleren
Opslaan