|
|
|
|
|
|
|
|
- user: {{ name }} |
|
|
- user: {{ name }} |
|
|
- group: {{ user_group }} |
|
|
- group: {{ user_group }} |
|
|
- makedirs: True |
|
|
- makedirs: True |
|
|
- mode: 700 |
|
|
|
|
|
- dir_mode: 700 |
|
|
|
|
|
|
|
|
- mode: '0700' |
|
|
|
|
|
- dir_mode: '0700' |
|
|
- require: |
|
|
- require: |
|
|
- user: {{ name }} |
|
|
- user: {{ name }} |
|
|
- group: {{ user_group }} |
|
|
- group: {{ user_group }} |
|
|
|
|
|
|
|
|
- user: {{ name }} |
|
|
- user: {{ name }} |
|
|
- group: {{ user_group }} |
|
|
- group: {{ user_group }} |
|
|
{% if key_name.endswith(".pub") %} |
|
|
{% if key_name.endswith(".pub") %} |
|
|
- mode: 644 |
|
|
|
|
|
|
|
|
- mode: '0644' |
|
|
{% else %} |
|
|
{% else %} |
|
|
- mode: 600 |
|
|
|
|
|
|
|
|
- mode: '0600' |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
- show_diff: False |
|
|
- show_diff: False |
|
|
{%- set key_value = salt['pillar.get']('users:'+name+':ssh_keys:'+_key) %} |
|
|
{%- set key_value = salt['pillar.get']('users:'+name+':ssh_keys:'+_key) %} |
|
|
|
|
|
|
|
|
- name: {{ home }}/.ssh/authorized_keys |
|
|
- name: {{ home }}/.ssh/authorized_keys |
|
|
- user: {{ name }} |
|
|
- user: {{ name }} |
|
|
- group: {{ user_group }} |
|
|
- group: {{ user_group }} |
|
|
- mode: 600 |
|
|
|
|
|
|
|
|
- mode: '0600' |
|
|
{% if 'ssh_auth_file' in user %} |
|
|
{% if 'ssh_auth_file' in user %} |
|
|
- contents: | |
|
|
- contents: | |
|
|
{% for auth in user.ssh_auth_file -%} |
|
|
{% for auth in user.ssh_auth_file -%} |
|
|
|
|
|
|
|
|
- name: {{ home }}/.ssh/{{ key_name }} |
|
|
- name: {{ home }}/.ssh/{{ key_name }} |
|
|
- user: {{ name }} |
|
|
- user: {{ name }} |
|
|
- group: {{ user_group }} |
|
|
- group: {{ user_group }} |
|
|
- mode: 600 |
|
|
|
|
|
|
|
|
- mode: '0600' |
|
|
- show_diff: False |
|
|
- show_diff: False |
|
|
- contents_pillar: {{ pillar_name }}:{{ key_name }}:privkey |
|
|
- contents_pillar: {{ pillar_name }}:{{ key_name }}:privkey |
|
|
- require: |
|
|
- require: |
|
|
|
|
|
|
|
|
- name: {{ home }}/.ssh/{{ key_name }}.pub |
|
|
- name: {{ home }}/.ssh/{{ key_name }}.pub |
|
|
- user: {{ name }} |
|
|
- user: {{ name }} |
|
|
- group: {{ user_group }} |
|
|
- group: {{ user_group }} |
|
|
- mode: 644 |
|
|
|
|
|
|
|
|
- mode: '0644' |
|
|
- show_diff: False |
|
|
- show_diff: False |
|
|
- contents_pillar: {{ pillar_name }}:{{ key_name }}:pubkey |
|
|
- contents_pillar: {{ pillar_name }}:{{ key_name }}:pubkey |
|
|
- require: |
|
|
- require: |
|
|
|
|
|
|
|
|
- name: {{ home }}/.ssh/config |
|
|
- name: {{ home }}/.ssh/config |
|
|
- user: {{ name }} |
|
|
- user: {{ name }} |
|
|
- group: {{ user_group }} |
|
|
- group: {{ user_group }} |
|
|
- mode: 640 |
|
|
|
|
|
|
|
|
- mode: '0640' |
|
|
- contents: | |
|
|
- contents: | |
|
|
# Managed by Saltstack |
|
|
# Managed by Saltstack |
|
|
# Do Not Edit |
|
|
# Do Not Edit |
|
|
|
|
|
|
|
|
- contents_pillar: 'users:{{ name }}:google_auth:{{ svc }}' |
|
|
- contents_pillar: 'users:{{ name }}:google_auth:{{ svc }}' |
|
|
- user: root |
|
|
- user: root |
|
|
- group: {{ users.root_group }} |
|
|
- group: {{ users.root_group }} |
|
|
- mode: 400 |
|
|
|
|
|
|
|
|
- mode: '0400' |
|
|
- require: |
|
|
- require: |
|
|
- pkg: users_googleauth-package |
|
|
- pkg: users_googleauth-package |
|
|
{%- endfor %} |
|
|
{%- endfor %} |