forked from chocolatey/chocolatey-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chocolatey#17) Add TLS option for bootstrapping
Previously, the TLS configuration was set to allow both TLS 1.1 and TLS 1.2. WIth this change, users can explicitly set the TLS versions they want to allow during bootstrapping. The default settings are to allow TLS 1.1 through 1.3, according to the TLS verisons available on the client.
- Loading branch information
Showing
6 changed files
with
65 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
chocolatey/tests/integration/targets/win_chocolatey/tasks/install_tests.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
- name: ensure Chocolatey is not installed | ||
win_shell: Get-Item -LiteralPath "C:/ProgramData/chocolatey" -ErrorAction Ignore | Remove-Item -Recurse -Force | ||
|
||
- name: install Chocolatey using the test bootstrap script | ||
win_chocolatey: | ||
name: chocolatey | ||
state: present | ||
bootstrap_script: "{{ test_choco_bootstrap_script }}" | ||
|
||
- name: checking if the bootstrap file has been created | ||
win_shell: Get-Content -Path "C:/temp/confirm-bootstrap.txt" -Raw | ||
register: bootstrap_file_check | ||
|
||
- name: assert bootstrap file has been created | ||
assert: | ||
that: | ||
- (bootstrap_file_check.stdout|from_json).bootstrap | ||
|
||
- name: ensure Chocolatey is not installed | ||
win_shell: Get-Item -LiteralPath "C:/ProgramData/chocolatey" -ErrorAction Ignore | Remove-Item -Recurse -Force | ||
|
||
- name: installing Chocolatey from Community Repository with TLS 1.1 only should fail | ||
win_chocolatey: | ||
bootstrap_tls_version: [ tls11 ] | ||
register: test_tls_version | ||
failed_when: not test_tls_version.failed |
3 changes: 3 additions & 0 deletions
3
chocolatey/tests/integration/targets/win_chocolatey/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters