On Thu, 5 Nov 2020 at 23:17, [email protected] <[email protected]>
wrote:

> So i'm having difficulties and am quite stuck...
>
> My goal is to capture details from a UNC paths NTFS ACLS.
>
> Important details are below.
>
>
>   - name: Teach him to fish - Run it
>     win_shell: |
>       . C:\Temp\grp_enum.ps1
>
>       enumerate -path "{{ path }}"
>     become: yes
>     become_method: runas
>     vars:
>       ansible_become_user: '{{ h_become_user }}'
>       ansible_become_pass: '{{ h_become_pass }}'
>     register: fishing
>
>   - name: process fish
>     set_fact:
>       chum: "{{ fishing.stdout | from_json }}"
>
>   - name: plate SamAccountName's
>     set_fact:
>       caughtfish: "{{ chum | json_query(jmesquery) }}"
>     vars:
>       jmesquery: 'chum.SamAccountName'
>
>   - name: serve samaccountnames
>     debug:
>       msg: " Fucking output something already! {{caughtfish}}"
>
> Spits out JSON formatted
>     "ansible_facts": {
>         "chum": [
>             {
>                 "DistinguishedName": "CN=LASTNAME\\, FIRSTNAME
> (USN123),OU=Users,OU=ORGANIZATION,DC=CONSONTO,DC=net",
>                 "SamAccountName": "USN123"
>             },
>             {
>                 "DistinguishedName": "CN=LASTNAME1\\, FIRSTNAME1
> (USN234),OU=Users,OU=ORGANIZATION,DC=CONSONTO,DC=net",
>                 "SamAccountName": "USN234"
>             }
>         ]
>     },
>
>
> Yet no matter how I skin this fish...
>
>
>
> PLATES results
>
> ok: [l1pnchwmgt12.columbuschildrens.net] => {
>     "ansible_facts": {
>         "caughtfish": ""
>     },
>     "changed": false
> }
>
> SERVES results
>
> ok: [l1pnchwmgt12.columbuschildrens.net] => {
>     "msg": " Fucking output something already! "
> }
>
>
> I can't get this thing to give me any data, what so ever...
>


It does give you data, but judging from your comments, not the data you
want, or in a different format. But it's not clear what you want ('skin
fish'??).

What are you exactly looking for?
What is the expected result?



>
> P.s. google groups sucks in conversion, no format as code is a sin.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/27f9734c-f60a-43e9-93a4-2b022c377710n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/27f9734c-f60a-43e9-93a4-2b022c377710n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
-- 
Sent from a mobile device - please excuse the brevity, spelling and
punctuation.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAL8fbwNOpmzQ%3DpAWAPtiJ5EQyV06H3_anjxyjODrO5ScFvDykA%40mail.gmail.com.

Reply via email to