Open patsevanton opened 3 years ago
ansible 2.8.16:
yandex: fatal: [default]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"setup": {"failed": true, "module_stderr": "Warning: Permanently added '[127.0.0.1]:54697' (RSA) to the list of known hosts.\r\nParameter format not correct - ;\r\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}}, "msg": "The following modules failed to execute: setup\n"}
ansible 2.9.14:
yandex: fatal: [default]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"setup": {"failed": true, "module_stderr": "Warning: Permanently added '[127.0.0.1]:55088' (RSA) to the list of known hosts.\r\nParameter format not correct - ;\r\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}}, "msg": "The following modules failed to execute: setup\n"}
ansible 2.5.15:
yandex: fatal: [default]: FAILED! => {"changed": false, "module_stderr": "The filename, directory name, or volume label syntax is incorrect.\r\n#< CLIXML\r\n<Objs Version=\"1.1.0.1\" xmlns=\"http://schemas.microsoft.com/powershell/2004/04\"><Obj S=\"progress\" RefId=\"0\"><TN RefId=\"0\"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N=\"SourceId\">1</I64><PR N=\"Record\"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj><S S=\"Error\">invalid payload_x000D__x000A_</S><S S=\"Error\">At line:4 char:39_x000D__x000A_</S><S S=\"Error\">+ If (-not $split_parts.Length -eq 2) { throw \"invalid payload\" }_x000D__x000A_</S><S S=\"Error\">+ ~~~~~~~~~~~~~~~~~~~~~~~_x000D__x000A_</S><S S=\"Error\"> + CategoryInfo : OperationStopped: (invalid payload:String) [], RuntimeException_x000D__x000A_</S><S S=\"Error\"> + FullyQualifiedErrorId : invalid payload_x000D__x000A_</S><S S=\"Error\"> _x000D__x000A_</S></Objs>Connection to 127.0.0.1 closed.\r\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1}
Не помогает
- name: Set strong cryptography on 64 bit .Net Framework (version 4 and above)
become: yes
become_user: Administrator
ansible.windows.win_shell: |
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord
register: set_strong_cryptography
- debug: var=set_strong_cryptography.stdout_lines
- name: Force PowerShell to use TLS 1.2
become: yes
become_user: Administrator
ansible.windows.win_shell: |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
register: force_powershell_use_tls
- debug: var=force_powershell_use_tls.stdout_lines
Try run provisioners powershell before provisioners ansible.
Don`t work.
"provisioners": [
{
"type": "powershell",
"inline": [
"Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord",
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12"
]
}
]
ansible --version
packer build windows-ansible.json