Skip to content

Instantly share code, notes, and snippets.

/example Secret

Created September 17, 2017 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1338988ccabef0f97ef08b5664cc2d73 to your computer and use it in GitHub Desktop.
Save anonymous/1338988ccabef0f97ef08b5664cc2d73 to your computer and use it in GitHub Desktop.
{% set listing = salt['cmd.shell']("ls -la /home") %}
{% for perms, links, user, group, size, month, date, time, filename in listing %}
@HackyPenguin
Copy link

HackyPenguin commented Sep 17, 2017

ideally, I want to change this:

drwx------ 7 test test 278 Jul 10 16:25 test
drwx------ 7 test2 test2 278 Jul 10 16:25 test2

into something like this:

item1:
perms:drwx------ links:7 user:test group:test size;78 month:Jul date:10 time:16:25 filename:testdir
item2:
perms:drwx------ links:7 user:test2 group:test2 size;78 month:Jul date:10 time:16:25 filename:testdir2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment