Skip to content

Commit

Permalink
Merge pull request #3 from parmsib/force-package
Browse files Browse the repository at this point in the history
Added `wmi_exporter_force_package` variable
  • Loading branch information
sbaerlocher authored Oct 4, 2019
2 parents bb41187 + a5d8eab commit d4c73bc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ Allows passing full CLI flags. Defaults to an empty string.
wmi_exporter_extra_flags:
```

Whether to ignore existing choco installation and force 'package' type installation. Defaults to `false`.

```yml
wmi_exporter_force_package: false
```

### Global Variable

#### Proxy
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ wmi_exporter_extra_flags:
# Download directory for the wmi export installations files.
wmi_exporter_download_directory: "{{ ansible_env.TEMP }}\\wmi_exporter"

# Whether to force installation by package, i.e ignore existing choco
wmi_exporter_force_package: false

# If a proxy is in use this information can be used.
# By default, proxy settings are taken from the default_* variables,
# if they are not defined they are ignored.
Expand Down
3 changes: 2 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
- name: 'main : set install type choco'
set_fact:
wmi_exporter_install_type: 'choco'
when: register_wmi_exporter_choco_check.stat.exists
when: register_wmi_exporter_choco_check.stat.exists and
not wmi_exporter_force_package

- name: 'main : include install type'
include_tasks: 'install/{{ var_filename }}.yml'
Expand Down

0 comments on commit d4c73bc

Please sign in to comment.