Property _ansible_selinux_special_fs in resource xADDomain is not a valid property

87 views
Skip to first unread message

Phyo Shwe

unread,
May 18, 2016, 4:59:48 PM5/18/16
to Ansible Project
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

---
- hosts: ps_main
  gather_facts
: false
  tasks
:
 
- name: Make sure the LCM refresh mode is disabled
    win_lcm5
:
      refresh_mode
: "Disabled"
    tags
:
     
- Config
 
- name: Download required Packages
    win_oneget
:
      name
: "xActiveDirectory"
    tags
:
     
- Oneget
 
- name: Install ADDS and RSAT
    win_feature
:
      name
: "AD-Domain-Services,RSAT-AD-Tools"
    tags
:
     
- WindowsFeature
 
- name: Init Domain
    win_ad_xaddomain
:
     
DomainName: "dc01.testrealm.com"
     
DomainNetbiosName: "dc01"
     
DomainAdministratorCredential_username: "vagrant"
     
DomainAdministratorCredential_password: "vagrant"
     
SafemodeAdministratorPassword_username: "vagrant"
     
SafemodeAdministratorPassword_password: "vagrant"
    tags
:
     
- DomainInit
 
- name: Wait for domain
    win_ad_xwaitfordomain
:
     
DomainUserCredential_username: "vagrant"
     
DomainUserCredential_password: "vagrant"
     
RetryCount: 20
     
RetryIntervalSec: 30
 
- name: Add Users
    win_xaduser
:
     
DomainName: "dc01.testrealm.com"
     
DomainAdministratorCredential_username: "vagrant"
     
DomainAdministratorCredential_password: "vagrant"
     
UserName: "ichiban"
     
Password_username: "ichiban"
     
Password_password: "ichiP@ssw0rd"
    tags
:
     
- AddUsersEnter

Thanks!!!

Phyo Shwe

unread,
May 18, 2016, 5:45:47 PM5/18/16
to Ansible Project
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

Matt Davis

unread,
May 18, 2016, 6:38:52 PM5/18/16
to Ansible Project
Yeah, looks like those modules aren't properly handling _ansible_X internal module args.

Phyo Shwe

unread,
May 18, 2016, 7:47:05 PM5/18/16
to Ansible Project
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!

Trond Hindenes

unread,
May 23, 2016, 7:16:26 AM5/23/16
to Ansible Project
Hmm, might be time for me to update the generator scripts. I'll look into it and get back to you!

Christoph Wegener

unread,
May 23, 2016, 9:05:34 AM5/23/16
to Ansible Project


On Monday, May 23, 2016 at 9:16:26 PM UTC+10, Trond Hindenes wrote:
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" )

 

Christoph Wegener

unread,
May 23, 2016, 11:13:05 AM5/23/16
to Ansible Project

Phyo Shwe

unread,
May 23, 2016, 11:30:33 AM5/23/16
to Ansible Project
Thanks so much. For now I just commented out line 70 in powershell3_dscparser.ps1 then generated the modules that I need.

Trond Hindenes

unread,
May 23, 2016, 5:04:33 PM5/23/16
to Ansible Project
Thanks Christoph, merged!

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

Trond Hindenes

unread,
May 23, 2016, 6:14:00 PM5/23/16
to Ansible Project
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:


Trond Hindenes

unread,
May 23, 2016, 6:16:07 PM5/23/16
to Ansible Project
@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

Phyo Shwe

unread,
May 23, 2016, 9:42:03 PM5/23/16
to Ansible Project
You are awesome!! Thanks so much. I just generated all the modules with your fix and ran my playbook. No more error now.

Trond Hindenes

unread,
May 24, 2016, 6:22:40 AM5/24/16
to Ansible Project
Great! Glad to hear you got it working

-Trond
Reply all
Reply to author
Forward
0 new messages