Skip to content

Instantly share code, notes, and snippets.

@unacceptable
Last active November 5, 2019 17:15
Show Gist options
  • Select an option

  • Save unacceptable/2963cd1800dc9cc12c29e6588c8c46a5 to your computer and use it in GitHub Desktop.

Select an option

Save unacceptable/2963cd1800dc9cc12c29e6588c8c46a5 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')
@vikrantkaushik
Copy link

This is perfect but by any chance can we have uninstall yml as well pls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment