Skip to content

Commit

Permalink
Use debconf module instead of spawning a shell
Browse files Browse the repository at this point in the history
debconf[1] module allows you to use debconf-set-selections to configure
deb packages, and, it's more idempotent than spawning a shell & running
a command.

This commit is related to issue #17 on GitHub[2].
1. https://docs.ansible.com/ansible/debconf_module.html
2. #17

Signed-off-by: James Oguya <[email protected]>
  • Loading branch information
James Oguya committed Nov 11, 2015
1 parent 6783949 commit d6b3b1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion roles/dspace/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
tags: java

- name: Accept Oracle license
shell: echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
debconf: name='oracle-java7-installer' question='shared/accepted-oracle-license-v1-1' value='true' vtype='select'
tags: java

- name: Install Oracle Java
Expand Down
2 changes: 1 addition & 1 deletion roles/solr/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
tags: java

- name: Accept Oracle license
shell: echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
debconf: name='oracle-java7-installer' question='shared/accepted-oracle-license-v1-1' value='true' vtype='select'
tags: java

- name: Install Oracle Java
Expand Down

0 comments on commit d6b3b1c

Please sign in to comment.