Comments (9)
From @nwchandler on Feb 26, 2020 18:25
It’s been a while since I worked on this module, but I think I remember testing this behavior. Is it possible to remove an attribute by omitting it from the dictionary? So for example, instead of street: “”
will it remove the attribute if you do not include the line with street at all?
from community.windows.
From @thylocene on Feb 27, 2020 02:27
Hi Nick,
We need to include the attributes because of the automation but the issue
we have is that we cannot use street: '' for the scenario where the street
attribute is not provided since it is optional (creating a new user
account). With Set-Aduser PowerShell module to clear an attribute you have
to use $null. We have no way to do that with the existing module
See https://docs.microsoft.com/en-us/powershell/module/addsadministration/set-aduser?view=win10-ps
https://docs.microsoft.com/en-us/powershell/module/addsadministration/set-aduser?view=win10-ps
e.g.
To clear all values:
-Certificates $Null
On Thu, Feb 27, 2020 at 2:25 AM Nick Chandler [email protected]
wrote:
It’s been a while since I worked on this module, but I think I remember
testing this behavior. Is it possible to remove an attribute by omitting it
from the dictionary? So for example, instead of street: “” will it remove
the attribute if you do not include the line with street at all?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ansible/ansible/issues/67764?email_source=notifications&email_token=AA6YHU4S5BI2MBZ4ELP4SF3RE2X3JA5CNFSM4K34DPS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENBKVNI#issuecomment-591571637,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA6YHUYOS7A4C5C3CR2WAA3RE2X3JANCNFSM4K34DPSQ
.
from community.windows.
From @nwchandler on Feb 28, 2020 22:12
The scenario makes sense, I think. You have to include optional settings in the playbook in case they are passed in, but they might not all be passed in.
It seems like we could check for an empty string and, instead of passing that through to Set-ADUser
we could pass $null
instead.
I wonder if this is a pattern adopted (or problem solved) elsewhere in other modules already. Perhaps @jborean93 or others may know off hand?
from community.windows.
Was there any update on this? Im experiencing this same issue and would like to know if there are any further comments.
from community.windows.
I'm experiencing the same issue, I need to be able to leave values alone using omit as appropriate, but there are some others that I need to actively blank out.
from community.windows.
Experiencing the same issue.
from community.windows.
Same issues here. Any update on this?
from community.windows.
No updates except what's already here. This is a community driven collection so if you wish to see any changes on this front it needs to come from the community.
from community.windows.
The win_domain_user
module has been deprecated by #516 in favour of microsoft.ad.user. See the migration guide for more info on how to change your code to use the newer module.
The microsoft.ad.user
module can clear attributes by either setting it to null or an empty list.
from community.windows.
Related Issues (20)
- iis_webbinding IPv6 Problem
- improper string handling (evaluation) in community.windows.win_timezone
- Security scanners flag tests/integration/targets/win_psmodule_info/files/ansiblevault.0.3.0.nupkg
- user account not set correctly in created scheduled task when user is a domain user.
- Provide ability to add DHCP Options to win_dhcp_lease
- Provide ability to create a DHCP Scope
- Support IPv6 in win_dhcp_lease
- "The DISM PS module needs to be installed, this can be done through the windows-adk chocolately package" HOT 1
- Windows privileges to use the windows.win_dns_record module
- win_iis_webapplication is not idempotent. Absent state does not work as expected.
- Invalid error with the win_unzip module when attempting to unzip a zip file
- win_unzip breaks when using beta Pscx version 4
- win_dns_record: state changed but nothing is done when adding record HOT 3
- win_iis_webapppool cannot add multiple env vars
- Can not create scheduled task that runs only on last day of month
- Win_hotfix module fails to install cumulative update for Windows 11
- win_credential creates credentials for the become user HOT 2
- Unable to Install 'VirtualMachinePlatform' Feature on Windows Server 2022 using win_feature Module HOT 1
- adding "use_system_account" to work with GMSA accounts HOT 1
- win_feature : possibility to bypass WSUS server
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from community.windows.