Skip to content

Commit

Permalink
Playbook accepting parameter (package) to install
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankwilliams committed Oct 2, 2017
1 parent 7b1120d commit 9831e9f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions playbooks/package_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: Install package
hosts: "{{ hosts | default('all') }}"
gather_facts: false

vars:
_package: "{{ package }}"
_state: "{{ state | default('latest') }}"

tasks:
- name: Install package
package:
name: "{{ _package }}"
state: "{{ _state }}"
register: results
become: true

- name: Install output
debug:
msg: "{{ results }}"

0 comments on commit 9831e9f

Please sign in to comment.