I am trying to import a certificate using both
1. win_certificate_store
- name: Import certificate be used by IIS
win_certificate_store:
path: c:\temp\SDCW.abc.com.pfx
password: test01
state: present
file_type: pkcs12
store_location: LocalMachine
store_name: My
key_storage: machine
key_exportable: yes
become: yes
become_method: runas
become_user: SYSTEM
2. win_shell + Import-PfxCertificate
- name: Import certificate to be used by IIS, using win_shell (powershell)
win_shell: |
$securePassword = "test01"
$mypwd = ConvertTo-SecureString -String $securePassword -Force
-AsPlainText
$certFilePath = "c:\temp\SDCW.abc.com.pfx"
Import-PfxCertificate -FilePath $certFilePath -CertStoreLocation
cert:\LocalMachine\My -Exportable -Password $mypwd
Both ways always give me errors relating to password
The specified network password is not correct
I am able to run the above PS script locally on my local computer and
import the cert successfully, so I know the password is correct.
If anyone has any ideas, it would be appreciated.
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/43e3ca3c-cb3e-4388-a94f-778cf196be80n%40googlegroups.com.