| --- |
| - name: Install add-apt-repository |
| become: yes |
| apt: name=software-properties-common=0.92* state=present update_cache=yes |
| |
| - name: Add Oracle Java repository |
| become: yes |
| apt_repository: repo='ppa:webupd8team/java' update_cache=yes |
| |
| - name: Accept Java 8 license |
| become: yes |
| debconf: name='oracle-java8-installer' question='shared/accepted-oracle-license-v1-1' value='true' vtype='select' |
| |
| - name: Install Oracle Java 8 |
| become: yes |
| apt: name={{item}} state=present |
| with_items: |
| - oracle-java8-installer=8* |
| - ca-certificates=14.04* |
| - oracle-java8-set-default=8* |