Last active
August 25, 2015 22:20
-
-
Save mjinks/9df440d5042dd67d4977 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo salt 'ftp*' state.sls users test=True | |
[...] | |
---------- | |
ID: ATTFiles_user | |
Function: file.directory | |
Name: /FTPDATA/PRLSS/Customers/ATTFiles | |
Result: None | |
Comment: The following files will be changed: | |
/FTPDATA/PRLSS/Customers/ATTFiles: mode - 0570 <- this is right | |
Started: 16:07:45.827483 | |
Duration: 0.503 ms | |
Changes: | |
---------- | |
[...] | |
---------- | |
ID: uscc_user | |
Function: file.directory | |
Name: /FTPDATA/PRLSS/Customers/USCC | |
Result: None | |
Comment: The following files will be changed: | |
/FTPDATA/PRLSS/Customers/USCC: mode - 0570 <- this is wrong | |
Started: 16:07:46.343900 | |
Duration: 0.538 ms | |
Changes: | |
---------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo salt 'ftp*' pillar.get users:uscc:chroot | |
ftp01.chi5.prlss.int: | |
False | |
$ sudo salt 'ftp*' pillar.get users:ATTFiles:chroot | |
ftp01.chi5.prlss.int: | |
True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ATTFiles: | |
uid: 5401 | |
prime_group: | |
name: ATTFiles | |
gid: 5401 | |
fullname: ATT Files EMI Access | |
home: /FTPDATA/PRLSS/Customers/ATTFiles | |
ftpuser: True | |
createhome: True | |
chroot: True | |
shell: /bin/sh | |
uscc: | |
uid: 5412 | |
prime_group: | |
name: uscc | |
gid: 5412 | |
fullname: USCC EMI Access | |
home: /FTPDATA/PRLSS/Customers/USCC | |
ftpuser: True | |
createhome: True | |
chroot: False | |
shell: /bin/sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ name }}_user: | |
{% if user.get('createhome', True) %} | |
file.directory: | |
- name: {{ home }} | |
- user: {{ name }} | |
- group: 'tmsadmin' | |
{% if user.get('chroot'), True %} | |
- mode: {{ user.get('user_dir_mode', '0570') }} | |
{% else %} | |
- mode: {{ user.get('user_dir_mode', '0770') }} | |
{% endif %} | |
- require: | |
- user: {{ name }} | |
- group: {{ user_group }} | |
{%- endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment