Re: [ansible-project] win_domain_computer module

2020-05-21 Thread Jordan Borean
> The documentation page for this module only says name is mandatory 
parameter, rest is optional.

There is only 1 option that is always required 'name', but if you read the 
description you can see that there are multiple others that are required 
when 'state=present'.

> I want to retrieve it’s OU location

The module doesn't look like it will do what you want, it's designed to 
enforce a state which requires input. If you want to get the status/info of 
an existing resource you will have to develop your own 
win_domain_computer_info module or just use 'win_shell: Get-ADComputer' as 
you've already pointed out only requires the identity.

-- 
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/f59e5a0a-825b-4416-b0f7-9804a7b5e9f0%40googlegroups.com.


Re: [ansible-project] win_domain_computer module

2020-05-21 Thread Ramakrishnan M
I tried that too, if I put State present, it’s asking for ou parameter is 
required. I want to retrieve it’s OU location. It just keep on asking one by 
one parameters as required. The documentation page for this module only says 
name is mandatory parameter, rest is optional.

Get-ADConputer will just work with identity as only parameter required.

Rama

Sent from my iPhone

> On May 21, 2020, at 19:40, Jordan Borean  wrote:
> 
> 
> According to the docs, dns_hostname is
> 
>> Required when state=present.
> 
> So you need to have this set for the module to work.
> 
> Thanks
> 
> Jordan
> 
> 
> -- 
> 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/f363da27-26f8-41c7-8675-d45fa82bfcdf%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/48E865AE-4321-4CB1-B000-9DEE9ECD72BA%40gmail.com.


Re: [ansible-project] win_domain_computer module

2020-05-21 Thread Jordan Borean
According to the docs, dns_hostname is

Required when *state=present*.
>

So you need to have this set for the module to work.

Thanks

Jordan


-- 
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/f363da27-26f8-41c7-8675-d45fa82bfcdf%40googlegroups.com.


Re: [ansible-project] win_domain_computer module

2020-05-21 Thread Ramakrishnan M
All I need is to get properties of a domain computer- Get-ADComputer. Ansible 
equivalent win_domain_computer.

Sent from my iPhone

> On May 21, 2020, at 17:09, David Foley  wrote:
> 
> If your looking at doing work on Active Directory; you may need to switch 
> over to "win_domain_membership"
> 
> -- 
> 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/4264a2b3-c0ef-4c3d-96c3-ea621ee0bb3a%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/5054054A-B0E8-49C9-901D-69F605AD836B%40gmail.com.


[ansible-project] win_domain_computer module

2020-05-21 Thread David Foley
If your looking at doing work on Active Directory; you may need to switch over 
to "win_domain_membership"

-- 
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/4264a2b3-c0ef-4c3d-96c3-ea621ee0bb3a%40googlegroups.com.


[ansible-project] win_domain_computer module

2020-05-21 Thread Ramakrishnan M
Hi Guys,

Why would I get missing parameter error when I use win_domain_computer
module when the parameter is set as optional.

  win_domain_computer:
  name: '{{ hostname }}'
  register: computer_account

Errors as...

FAILED! => {
"changed": false,
"msg": "Get-AnsibleParam: Missing required argument: dns_hostname"
}

Thanks

-- 
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/CA%2BNR4K%2BRFcPuxsq9fohtttiwKcdpoDt7iwN3%3DVJk%2B61T2%2Buxhg%40mail.gmail.com.