`
-
name: Install ADCS with sub features and management tools
win_feature:
name: Adcs-Cert-Authority
state: present
include_management_tools: yes
register: win_feature -
name: reboot if installing Adcs-Cert-Authority feature requires it
win_reboot:
when: win_feature.reboot_required -
name: Add ActiveDirectoryCSDsc
win_psmodule:
name: ActiveDirectoryCSDsc
state: present -
name: Configure AdcsCertificationAuthority Powershell DSC
win_dsc:
resource_name: AdcsCertificationAuthority
IsSingleInstance: ‘Yes’
CAType: ‘EnterpriseRootCA’
CryptoProviderName: ‘RSA#Microsoft Software Key Storage Provider’
KeyLength: 2048
HashAlgorithmName: ‘SHA256’
ValidityPeriod: ‘Years’
ValidityPeriodUnits: 99
PsDscRunAsCredential_username: ’ {{ ansible_user }}’
PsDscRunAsCredentual_password: ‘{{ ansible_password }}’
`
`
TASK [internal/qa_env_dc : Configure AdcsCertificationAuthority Powershell DSC] *************************************************************************************************************************************************************
fatal: [10.0.136.5]: FAILED! => {“changed”: false, “module_stderr”: “Exception calling "Run" with "1" argument(s): "Exception calling "Invoke" with "0" argument(s): "The running command \r\nstopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Cannot bind \r\nargument to parameter ‘String’ because it is null.""\r\nAt line:65 char:5\r\n+ $output = $entrypoint.Run($payload)\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : NotSpecified: ( , ParentContainsErrorRecordException\r\n + FullyQualifiedErrorId : ScriptMethodRuntimeException\r\n \r\n”, “module_stdout”: “”, “msg”: “MODULE FAILURE”, “rc”: 1}
`
Im really just trying to re-create this powershell snippet I have been using.
`
Configure ADCS LDAP Over SSL
Add-WindowsFeature Adcs-Cert-Authority -IncludeManagementTools
Install-AdcsCertificationAuthority -CAType EnterpriseRootCa -CryptoProviderName “RSA#Microsoft Software Key Storage Provider” -KeyLength 2048 -HashAlgorithmName SHA256 -ValidityPeriod Years -ValidityPeriodUnits 99 -Credential $mycreds -Force:$true
`
Im not really sure how to troubleshoot that error coming back to me.