Skip to content

Instantly share code, notes, and snippets.

@luisxkimo
Forked from unacceptable/Install-Notepad++.yml
Created February 28, 2019 09:13
Show Gist options
  • Select an option

  • Save luisxkimo/2439a4809bfe3c902d3b3c90011aae7f to your computer and use it in GitHub Desktop.

Select an option

Save luisxkimo/2439a4809bfe3c902d3b3c90011aae7f to your computer and use it in GitHub Desktop.
- name: Installing Notepad++
win_package:
path: https://notepad-plus-plus.org/repository/7.x/7.5.1/npp.7.5.1.Installer.x64.exe
arguments: '/S'
product_id: "Notepad++"
state: present
when: ansible_os_family == 'Windows'
- name: Check Path Variable on Windows hosts
win_shell: $Env:Path
register: path
changed_when: False
when: ansible_os_family == 'Windows'
- name: Add Notepad++ to Path Variable on Windows hosts
win_environment:
state: present
name: Path
value: '{{ path.stdout }};C:\Program Files (x86)\Notepad++'
level: machine
when: (path.stdout.find('Notepad++') == -1 ) and
(ansible_os_family == 'Windows')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment