[ansible-project] Trying to Setup Azure AD Authentication

2022-11-21 Thread bhanu m
Hello Team, I am trying to setup Azure AD authentication for AWX operator. 
Followed 
this 
https://docs.ansible.com/automation-controller/latest/html/administration/ent_auth.html#azure-ad-settings.
 
Provided Azure AD client id, secrets and Added redirect uri's in Azure AD.

Getting azure AD login  to the  AWX not able to in the awx. I am able to 
sign-in successfully with ADMIN account.

*Azure AD OAuth2 Organization Map*

{
  "Default": {
"users": true
  }
}

Azure AD OAuth2 Team Ma

null.

Seeing below logs on AWX POD

2022-11-21 17:27:11,490 WARNING  [687901f56ca14d2892656776eee7dd12] 
awx.api.generics status 404 received by user AnonymousUser attempting to 
access /api/v2/workflow_job_nodes/ from 10.244.5.17

2022-11-21 17:27:11,492 WARNING  [687901f56ca14d2892656776eee7dd12] 
django.request Not Found: /api/v2/workflow_job_nodes/

2022-11-21 17:27:11,492 WARNING  [687901f56ca14d2892656776eee7dd12] 
django.request Not Found: /api/v2/workflow_job_nodes/

10.244.5.17 - - [21/Nov/2022:17:27:11 +] "GET 
/api/v2/workflow_job_nodes/?format=1ScmZkIzO HTTP/1.1" 404 23 "-" 
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; 360SE)" "10.244.5.1"

[pid: 1887|app: 0|req: 657/574556] 10.244.5.17 () {62 vars in 1146 bytes} 
[Mon Nov 21 17:27:11 2022] GET /api/v2/workflow_job_nodes/?format=1ScmZkIzO 
=> generated 23 bytes in 37 msecs (HTTP/1.1 404) 12 headers in 409 bytes (1 
switches on core 0)

2022-11-21 17:27:11,514 WARNING  [bde725b4e35d4973973066f158d5318c] 
django.request Not Acceptable: /api/v2/applications/2012/.listing

2022-11-21 17:27:11,514 WARNING  [bde725b4e35d4973973066f158d5318c] 
django.request Not Acceptable: /api/v2/applications/2012/.listing

10.244.5.17 - - [21/Nov/2022:17:27:11 +] "GET 
/api/v2/applications/2012/.listing HTTP/1.1" 406 57 "-" "Mozilla/4.0 
(compatible; MSIE 7.0; Windows NT 5.1; 360SE)" "10.244.5.1"

[pid: 1884|app: 0|req: 677/574557] 10.244.5.17 () {62 vars in 1067 bytes} 
[Mon Nov 21 17:27:11 2022] GET /api/v2/applications/2012/.listing => 
generated 57 bytes in 39 msecs (HTTP/1.1 406) 7 headers in 279 bytes (1 
switches on core 0)

2022-11-21 17:27:11,912 WARNING  [d681082ff7ac4672b36fe1969625fb02] 
django.request Not Acceptable: /api/v2/applications/2012/installer

2022-11-21 17:27:11,912 WARNING  [d681082ff7ac4672b36fe1969625fb02] 
django.request Not Acceptable: /api/v2/applications/2012/installer

10.244.4.15 - - [21/Nov/2022:17:27:11 +] "GET 
/api/v2/applications/2012/installer HTTP/1.1" 406 57 "-" "Mozilla/4.0 
(compatible; MSIE 7.0; Windows NT 5.1; 360SE)" "10.244.4.1"

[pid: 1887|app: 0|req: 658/574558] 10.244.4.15 () {64 vars in 1097 bytes} 
[Mon Nov 21 17:27:11 2022] GET /api/v2/applications/2012/installer => 
generated 57 bytes in 37 msecs (HTTP/1.1 406) 7 headers in 279 bytes (1 
switches on core 0)

2022-11-21 17:27:12,181 WARNING  [ef8e83a906454e7db5ada9dd55cda453] 
awx.api.generics status 404 received by user AnonymousUser attempting to 
access /api/v2/workflow_job_nodes/ from 10.244.5.17

2022-11-21 17:27:12,183 WARNING  [ef8e83a906454e7db5ada9dd55cda453] 
django.request Not Found: /api/v2/workflow_job_nodes/

2022-11-21 17:27:12,183 WARNING  [ef8e83a906454e7db5ada9dd55cda453] 
django.request Not Found: /api/v2/workflow_job_nodes/

10.244.5.17 - - [21/Nov/2022:17:27:12 +] "GET 
/api/v2/workflow_job_nodes/?format=cK3f2KDn';%20waitfor%20delay%20'0:0:15'%20--%20
 
HTTP/1.1" 404 23 "https://awx-dev01.attwifi.com/; "Mozilla/4.0 (compatible; 
MSIE 7.0; Windows NT 5.1; 360SE)" "10.244.5.1"

[pid: 1887|app: 0|req: 659/574559] 10.244.5.17 () {66 vars in 1345 bytes} 
[Mon Nov 21 17:27:12 2022] GET 
/api/v2/workflow_job_nodes/?format=cK3f2KDn';%20waitfor%20delay%20'0:0:15'%20--%20
 
=> generated 23 bytes in 44 msecs (HTTP/1.1 404) 12 headers in 409 bytes (1 
switches on core 0)

2022-11-21 17:27:12,359 WARNING  [58ef654908fc4bf617fa8609245a] 
django.request Not Acceptable: /api/v2/ad_hoc_commands/2012/include

2022-11-21 17:27:12,359 WARNING  [58ef654908fc4bf617fa8609245a] 
django.request Not Acceptable: /api/v2/ad_hoc_commands/2012/include

10.244.5.17 - - [21/Nov/2022:17:27:12 +] "GET 
/api/v2/ad_hoc_commands/2012/include HTTP/1.1" 406 57 "-" "Mozilla/4.0 
(compatible; MSIE 7.0; Windows NT 5.1; 360SE)" "10.244.5.1"

[pid: 1884|app: 0|req: 678/574560] 10.244.5.17 () {64 vars in 1100 bytes} 
[Mon Nov 21 17:27:12 2022] GET /api/v2/ad_hoc_commands/2012/include => 
generated 57 bytes in 37 msecs (HTTP/1.1 406) 7 headers in 279 bytes (1 
switches on core 0)

2022-11-21 17:27:12,363 WARNING  [a464b0c0cf66436a9cce156346e39560] 
django.request Not Acceptable: /api/v2/applications/2012/oldfiles

2022-11-21 17:27:12,363 WARNING  [a464b0c0cf66436a9cce156346e39560] 
django.request Not Acceptable: /api/v2/applications/2012/oldfiles

[pid: 1881|app: 0|req: 754/574561] 10.244.5.17 () {64 vars in 1094 bytes} 
[Mon Nov 21 17:27:12 2022] GET /api/v2/applications/2012/oldfiles => 
generated 57 bytes in 35 msecs (HTTP/1.1 406) 7 headers in 279 bytes (1 

Re: [ansible-project] why does this loop/when fail

2022-11-21 Thread Stefan Hornburg (Racke)

On 21/11/2022 14:01, rjwagn...@gmail.com wrote:

Wow.  Never would have thought to try that.  Escaping in YAML/Jinja is such an 
unintuitive mess.  Thanks so much, Andrew.


It is easier though when you use single quotes for the arguments of the 
regex_replace filter.

Regards

   Racke




On Friday, November 18, 2022 at 4:59:47 PM UTC-5 lat...@gmail.com wrote:



ok, here it is. should be \\1 vs \1 in your replacement and test(is) on 
string contents(in)


  - name: task 3
    debug:
      msg: "{{ item }} is in the s"
    loop: "{{ t_list }}"
    when: ( item | regex_replace("^p(\d+).*$", "\\1") ) is in s

  - name: task 3.orig

    debug:
      msg: "{{ item }} is in s"
    loop: "{{ t_list }}"
    when: ( item | regex_replace("^p(\d+).*$", "\1") ) in s



TASK [task 3] 

ok: [localhost] => (item=p1_xyz) => {
   "msg": "p1_xyz is in the s"
}
ok: [localhost] => (item=p2_xyz) => {
   "msg": "p2_xyz is in the s"
}

TASK [task 3.orig] 
***
skipping: [localhost] => (item=p1_xyz)
skipping: [localhost] => (item=p2_xyz)
skipping: [localhost]

PLAY RECAP 
***
localhost : ok=3  changed=0    unreachable=0    failed=0 
skipped=1  rescued=0    ignored=0


I did this in a hurry, so there may be mistakes or more awesome ways of 
doing this. YMMV


On Fri, Nov 18, 2022 at 2:05 PM Andrew Latham  wrote:

Rob

Trying to follow along, So on Task 3 you want to iterate over the list 
t_list and match if the digit is in variable s? First thought is that you are 
testing if an int is a string.





On Fri, Nov 18, 2022 at 12:00 PM rjwagn...@gmail.com 
 wrote:

Hey all - I think I'm losing my mind.  Can anyone explain why every 
iteration of task 3 is being skipped (compare w/ task 2, especially)?

(ansible2_12_8) rowagn@mlb656 client % cat d.yml
- hosts: all
  gather_facts: no
  vars:
    s: '1 2 3'
    t: p1_xyz
    t_list:
      - p1_xyz
      - p2_xyz

  tasks:
  - name: task 1
    debug:
      msg: '{{ ( t | regex_replace("^p(\d+).*$", "\1") ) in s }}'

  - name: task 2
    debug:
      msg: '{{ ( item | regex_replace("^p(\d+).*$", "\1") ) in s }}'
    loop: "{{ t_list }}"

  - name: task 3
    debug:
      msg: "{{ item }} is in s"
    loop: "{{ t_list }}"
    when: ( item | regex_replace("^p(\d+).*$", "\1") ) in s
(ansible2_12_8) rowagn@mlb656 client % ansible-playbook d.yml -i 
~/localhost

PLAY [all] 
**

TASK [task 1] 
***
ok: [localhost] => {
    "msg": true
}

TASK [task 2] 
***
ok: [localhost] => (item=p1_xyz) => {
    "msg": true
}
ok: [localhost] => (item=p2_xyz) => {
    "msg": true
}

TASK [task 3] 
***
skipping: [localhost] => (item=p1_xyz)
skipping: [localhost] => (item=p2_xyz)
skipping: [localhost]

PLAY RECAP 
**
localhost                  : ok=2    changed=0  unreachable=0    
failed=0    skipped=1    rescued=0    ignored=0

I've started at this for hours.

Rob
-- 
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/88a55b8c-718d-4a61-88c3-bf989525e65cn%40googlegroups.com
 
.



-- 
- Andrew "lathama" Latham -




-- 
- Andrew "lathama" Latham -


--
You received this message because you 

Re: [ansible-project] Ansible VMware - create datastore

2022-11-21 Thread Mike Smart
Hi Walter,
yes, would do it more than a several hundred times over next years.
Actually at this moment we do it via vCenter, but would be nicer and less 
typo via ansible


walte...@nist.gov schrieb am Montag, 21. November 2022 um 12:48:07 UTC+1:

> Is this something you will do often and that needs to be consistent? 
> Ansible isn't always the right solution. This specific task may be best 
> performed from within the vCenter or on the esxi command line since I 
> imagine it is something you will do once.
>
> Walter
> --
> Walter Rowe, Division Chief
> Infrastructure Services, OISM
> Mobile: 202.355.4123 <(202)%20355-4123>
>
> On Nov 19, 2022, at 10:54 AM, Mike Smart  wrote:
>
> Hello , 
>
> my ESXi (Dell T350) has two virtual drives.
> 1.st is 2*SDD  raid 1 for the Hypervisor 7.03 = datastore1 which is 
> automatically created by installing the Hypervisor via kickstart.
>
> Now my question is about the best practice on how to create the datastore2 
> (some TB raid5) for my VM's later on.
>
> Would it be possible within Ansible to create datastore2 on the second 
> available virtual disk?
> Or is there another best practice to do so?
>
> kr
> Mike
>
>
> -- 
> 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 ansible-proje...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/a02ca22e-36f2-48c3-91a9-867354f5422en%40googlegroups.com
>  
> 
> .
>
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/816070b4-dd56-4ad9-b6e6-91f06b2a094fn%40googlegroups.com.


Re: [ansible-project] why does this loop/when fail

2022-11-21 Thread rjwagn...@gmail.com
Wow.  Never would have thought to try that.  Escaping in YAML/Jinja is such 
an unintuitive mess.  Thanks so much, Andrew.

On Friday, November 18, 2022 at 4:59:47 PM UTC-5 lat...@gmail.com wrote:

>
>
> ok, here it is. should be \\1 vs \1 in your replacement and test(is) 
> on string contents(in)
>
>
>   - name: task 3
> debug:
>   msg: "{{ item }} is in the s"
> loop: "{{ t_list }}"
> when: ( item | regex_replace("^p(\d+).*$", "\\1") ) is in s
>
>   - name: task 3.orig
>
> debug:
>   msg: "{{ item }} is in s"
> loop: "{{ t_list }}"
> when: ( item | regex_replace("^p(\d+).*$", "\1") ) in s
>
>
>
> TASK [task 3] 
> 
>  
>
> ok: [localhost] => (item=p1_xyz) => { 
>"msg": "p1_xyz is in the s" 
> } 
> ok: [localhost] => (item=p2_xyz) => { 
>"msg": "p2_xyz is in the s" 
> } 
>
> TASK [task 3.orig] 
> ***
>  
>
> skipping: [localhost] => (item=p1_xyz)  
> skipping: [localhost] => (item=p2_xyz)  
> skipping: [localhost] 
>
> PLAY RECAP 
> ***
>  
>
> localhost  : ok=3changed=0unreachable=0 
>failed=0skipped=1rescued=0ignored=0
>   
>
> I did this in a hurry, so there may be mistakes or more awesome ways of 
> doing this. YMMV
>
>
> On Fri, Nov 18, 2022 at 2:05 PM Andrew Latham  wrote:
>
>> Rob
>>
>> Trying to follow along, So on Task 3 you want to iterate over the list 
>> t_list and match if the digit is in variable s? First thought is that you 
>> are testing if an int is a string.
>>
>>
>>
>>
>>
>> On Fri, Nov 18, 2022 at 12:00 PM rjwagn...@gmail.com  
>> wrote:
>>
>>> Hey all - I think I'm losing my mind.  Can anyone explain why every 
>>> iteration of task 3 is being skipped (compare w/ task 2, especially)?
>>>
>>> (ansible2_12_8) rowagn@mlb656 client % cat d.yml
>>> - hosts: all
>>>   gather_facts: no
>>>   vars:
>>> s: '1 2 3'
>>> t: p1_xyz
>>> t_list:
>>>   - p1_xyz
>>>   - p2_xyz
>>>
>>>   tasks:
>>>   - name: task 1
>>> debug:
>>>   msg: '{{ ( t | regex_replace("^p(\d+).*$", "\1") ) in s }}'
>>>
>>>   - name: task 2
>>> debug:
>>>   msg: '{{ ( item | regex_replace("^p(\d+).*$", "\1") ) in s }}'
>>> loop: "{{ t_list }}"
>>>
>>>   - name: task 3
>>> debug:
>>>   msg: "{{ item }} is in s"
>>> loop: "{{ t_list }}"
>>> when: ( item | regex_replace("^p(\d+).*$", "\1") ) in s
>>> (ansible2_12_8) rowagn@mlb656 client % ansible-playbook d.yml -i 
>>> ~/localhost
>>>
>>> PLAY [all] 
>>> **
>>>
>>> TASK [task 1] 
>>> ***
>>> ok: [localhost] => {
>>> "msg": true
>>> }
>>>
>>> TASK [task 2] 
>>> ***
>>> ok: [localhost] => (item=p1_xyz) => {
>>> "msg": true
>>> }
>>> ok: [localhost] => (item=p2_xyz) => {
>>> "msg": true
>>> }
>>>
>>> TASK [task 3] 
>>> ***
>>> skipping: [localhost] => (item=p1_xyz)
>>> skipping: [localhost] => (item=p2_xyz)
>>> skipping: [localhost]
>>>
>>> PLAY RECAP 
>>> **
>>> localhost  : ok=2changed=0unreachable=0   
>>>  failed=0skipped=1rescued=0ignored=0
>>>
>>> I've started at this for hours.
>>>
>>> Rob
>>>
>>> -- 
>>> 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 ansible-proje...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/88a55b8c-718d-4a61-88c3-bf989525e65cn%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>
>>
>> -- 
>> - Andrew "lathama" Latham -
>>
>
>
> -- 
> - Andrew "lathama" Latham -
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a54f7244-663e-42d5-bc37-ef23d3960e5en%40googlegroups.com.


Re: [ansible-project] Ansible VMware - create datastore

2022-11-21 Thread 'Rowe, Walter P. (Fed)' via Ansible Project
Is this something you will do often and that needs to be consistent? Ansible 
isn't always the right solution. This specific task may be best performed from 
within the vCenter or on the esxi command line since I imagine it is something 
you will do once.

Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123

On Nov 19, 2022, at 10:54 AM, Mike Smart 
mailto:smarti...@gmail.com>> wrote:

Hello ,

my ESXi (Dell T350) has two virtual drives.
1.st is 2*SDD  raid 1 for the Hypervisor 7.03 = datastore1 which 
is automatically created by installing the Hypervisor via kickstart.

Now my question is about the best practice on how to create the datastore2 
(some TB raid5) for my VM's later on.

Would it be possible within Ansible to create datastore2 on the second 
available virtual disk?
Or is there another best practice to do so?

kr
Mike


--
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 
ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a02ca22e-36f2-48c3-91a9-867354f5422en%40googlegroups.com.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/AAC01C90-17D7-463B-BDAF-55C206313A5A%40nist.gov.


[ansible-project] Create File Directory inside Domain User Account

2022-11-21 Thread Emerson Natividad
Hi Everyone,

I just want to ask what is the playbook script/s to create files or 
directory inside of Domain Users Desktop? TIA.


-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/bccf663a-3f11-410e-b477-68df28f58c2dn%40googlegroups.com.