29
windows/windows_choco_multiple.yml
Normal file
29
windows/windows_choco_multiple.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: Chocolatey install multiple
|
||||
hosts: "{{ HOSTS | default('windows') }}"
|
||||
gather_facts: false
|
||||
vars:
|
||||
choco_packages:
|
||||
- name: nodejs
|
||||
version: 13.0.0
|
||||
- name: python
|
||||
version: 3.6.0
|
||||
tasks:
|
||||
- name: Install specific versions of packages sequentially
|
||||
win_chocolatey:
|
||||
name: "{{ item.name }}"
|
||||
version: "{{ item.version }}"
|
||||
loop: "{{ choco_packages }}"
|
||||
|
||||
- name: Check python version
|
||||
win_command: python --version
|
||||
register: check_python_version
|
||||
changed_when: false
|
||||
|
||||
- name: Check nodejs version
|
||||
win_command: node --version
|
||||
register: check_node_version
|
||||
changed_when: false
|
||||
|
||||
- debug:
|
||||
msg: Python Version is {{ check_python_version.stdout_lines[0] }} and NodeJS version is {{ check_node_version.stdout_lines[0] }}
|
||||
Reference in New Issue
Block a user