Property _ansible_selinux_special_fs in resource xADDomain is not a valid property

Hi,

I am testing out ansible win_dsc module that Trond wrote. Everything worked great except when I start using the xActiveDirectory modules. I used Trond’s ansible module generator to get the modules. I didn’t get any error and I see all the modules exported. When I run the play book I get the error “Property _ansible_selinux_special_fs in resource xADDomain is not a valid property.” I searched around the web but couldn’t really find much about this error. Please help!

fatal: [10.255.10.20]: FAILED! => {"Attributes": ["DomainAdministratorCredential_password", "DomainAdministratorCredential_username", "DomainName", "DomainNetbiosName", "SafemodeAdministratorPassword_password", "SafemodeAdministratorPassword_username", "_ansible_check_mode", "_ansible_debug", "_ansible_diff", "_ansible_no_log", "_ansible_selinux_special_fs", "_ansible_syslog_facility", "_ansible_verbosity", "_ansible_version"], "DomainAdministratorCredential_password": "vagrant", "DomainAdministratorCredential_username": "vagrant", "DomainName": "dc01.testrealm.com", "DomainNetbiosName": "dc01", "SafemodeAdministratorPassword_password": "vagrant", "SafemodeAdministratorPassword_username": "vagrant", "changed": false, "failed": true, "invocation": {"module_name": "win_ad_xaddomain"}, "msg": "Property _ansible_selinux_special_fs in resource xADDomain is not a valid property", "resource_name": "xADDomain"} .

And here is my playbook

`

Turns out I was using the devel version of ansbile and that was causing the error. Now I am on Ansible 2.0.2 and get a new error.

`
TASK [Init Domain] *************************************************************
fatal: [10.255.10.20]: FAILED! => {“Attributes”: [“DomainAdministratorCredential_password”, “DomainAdministratorCredential_username”, “DomainName”, “DomainNetbiosName”, “SafemodeAdministratorPassword_password”, “SafemodeAdministratorPassword_username”, “_ansible_check_mode”, “_ansible_debug”, “_ansible_diff”, “_ansible_no_log”, “_ansible_verbosity”], “DomainAdministratorCredential_password”: “vagrant”, “DomainAdministratorCredential_username”: “vagrant”, “DomainName”: “dc01.testrealm.com”, “DomainNetbiosName”: “dc01”, “SafemodeAdministratorPassword_password”: “vagrant”, “SafemodeAdministratorPassword_username”: “vagrant”, “changed”: false, “failed”: true, “msg”: “Property _ansible_debug in resource xADDomain is not a valid property”, “resource_name”: “xADDomain”}

`

Could it be that ansible is passing these attributes into the powershell modules but ps isn’t doing accepting it?

Thanks
Phyo

Yeah, looks like those modules aren’t properly handling _ansible_X internal module args.

Yea I just read the win_xaddomain.ps1 and found out why it’s causing the error. I think Trond win_dsc5 module generator is expecting the keys and values of old ansible version and you guys added these new value or something and failing it.

I comment out the line below and now the script just hanged. I am going to create an issue on the git instead.

`

Fail-Json -obj $result -message “Property $key in resource $dscresourcename is not a valid property”

`

Thanks for the help again!

Hmm, might be time for me to update the generator scripts. I’ll look into it and get back to you!

Dang! Perfect timing. I ran into the internal ansible variable handling issue in win_dsc5 literally just now! (Trying to use ‘Group’ DSC resource in WMF5 with ansible ‘devel’ branch - msg: “Property _ansible_debug in resource Group is not a valid property” )

Fixed in win_dsc5: https://github.com/trondhindenes/Ansible-win_dsc/pull/6

Thanks so much. For now I just commented out line 70 in powershell3_dscparser.ps1 then generated the modules that I need.

Thanks Christoph, merged!

As for the module generator, i’m fixing that now.

As for the AnsibleDscModuleGenerator, I’ve implemented a similar fix there (simply disregarding all options beginning with “_ansible”. We’re probably gonna use the “check-mode” option later since we can do that natively with DSC, but for now this should work:

@Phyo, could you git pull and try again whenever you have a minute? While your method works I really want to retain the checking of options into the module (before the DSC parser gets them) just to be a good Ansible citizen.

-Trond

You are awesome!! Thanks so much. I just generated all the modules with your fix and ran my playbook. No more error now.

Great! Glad to hear you got it working

-Trond