Skip to content

Commit

Permalink
style: quote numbers and file modes
Browse files Browse the repository at this point in the history
salt linters complain about these.
  • Loading branch information
jason shaw committed Oct 2, 2020
1 parent b5aac77 commit db30289
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion users/bashrc.sls
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ users_{{ name }}_user_bashrc:
- name: {{ home }}/.bashrc
- user: {{ name }}
- group: {{ user_group }}
- mode: 644
- mode: '0644'
- template: jinja
- source:
- salt://users/files/bashrc/{{ name }}/bashrc
Expand Down
2 changes: 1 addition & 1 deletion users/googleauth.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ users_{{ users.googleauth_dir }}:
- name: {{ users.googleauth_dir }}
- user: root
- group: {{ users.root_group }}
- mode: 600
- mode: '0600'
{%- for name, user in pillar.get('users', {}).items() if user.absent is not defined or not user.absent %}
{%- if 'google_auth' in user %}
Expand Down
18 changes: 9 additions & 9 deletions users/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ user_keydir_{{ name }}:
- user: {{ name }}
- group: {{ user_group }}
- makedirs: True
- mode: 700
- dir_mode: 700
- mode: '0700'
- dir_mode: '0700'
- require:
- user: {{ name }}
- group: {{ user_group }}
Expand All @@ -246,9 +246,9 @@ users_{{ name }}_{{ key_name }}_key:
- user: {{ name }}
- group: {{ user_group }}
{% if key_name.endswith(".pub") %}
- mode: 644
- mode: '0644'
{% else %}
- mode: 600
- mode: '0600'
{% endif %}
- show_diff: False
{%- set key_value = salt['pillar.get']('users:'+name+':ssh_keys:'+_key) %}
Expand All @@ -272,7 +272,7 @@ users_authorized_keys_{{ name }}:
- name: {{ home }}/.ssh/authorized_keys
- user: {{ name }}
- group: {{ user_group }}
- mode: 600
- mode: '0600'
{% if 'ssh_auth_file' in user %}
- contents: |
{% for auth in user.ssh_auth_file -%}
Expand Down Expand Up @@ -305,7 +305,7 @@ user_ssh_keys_files_{{ name }}_{{ key_name }}_private_key:
- name: {{ home }}/.ssh/{{ key_name }}
- user: {{ name }}
- group: {{ user_group }}
- mode: 600
- mode: '0600'
- show_diff: False
- contents_pillar: {{ pillar_name }}:{{ key_name }}:privkey
- require:
Expand All @@ -318,7 +318,7 @@ user_ssh_keys_files_{{ name }}_{{ key_name }}_public_key:
- name: {{ home }}/.ssh/{{ key_name }}.pub
- user: {{ name }}
- group: {{ user_group }}
- mode: 644
- mode: '0644'
- show_diff: False
- contents_pillar: {{ pillar_name }}:{{ key_name }}:pubkey
- require:
Expand Down Expand Up @@ -377,7 +377,7 @@ users_ssh_config_{{ name }}:
- name: {{ home }}/.ssh/config
- user: {{ name }}
- group: {{ user_group }}
- mode: 640
- mode: '0640'
- contents: |
# Managed by Saltstack
# Do Not Edit
Expand Down Expand Up @@ -516,7 +516,7 @@ users_googleauth-{{ svc }}-{{ name }}:
- contents_pillar: 'users:{{ name }}:google_auth:{{ svc }}'
- user: root
- group: {{ users.root_group }}
- mode: 400
- mode: '0400'
- require:
- pkg: users_googleauth-package
{%- endfor %}
Expand Down
2 changes: 1 addition & 1 deletion users/profile.sls
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ users_{{ name }}_user_profile:
- name: {{ home }}/.profile
- user: {{ name }}
- group: {{ user_group }}
- mode: 644
- mode: '0644'
- template: jinja
- source:
- salt://users/files/profile/{{ name }}/profile
Expand Down
2 changes: 1 addition & 1 deletion users/vimrc.sls
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ users_{{ name }}_user_vimrc:
- name: {{ home }}/.vimrc
- user: {{ name }}
- group: {{ user_group }}
- mode: 644
- mode: '0644'
- template: jinja
- source:
- salt://users/files/vimrc/{{ name }}/vimrc
Expand Down

0 comments on commit db30289

Please sign in to comment.