Your input
- name: Setup oracle java deb repo
apt_repository:
repo: "ppa:webupd8team/java"
update_cache: yes
is invalid YAML.
This is correct (value for name
is a scalar spread over multiple lines):
- name: Setup oracle java deb repo
apt_repository
repo "ppa:webupd8team/java"
update_cache yes
And this is correct as well (proper indentation at 2 indents):
- name: Setup oracle java deb repo
apt_repository:
repo: "ppa:webupd8team/java"
update_cache: yes
You probably want the later.