Error installing Java on virtual machine

Asked

Viewed 56 times

2

I’m trying to run a playbook (Ansible-playbook -i hosts.ini.yml file) that installs the java on my virtual machine, but it accuses error in the installation task:

FAILED! = > {"changed": false, "cmd": "apt-key add -", "failed": true, "msg": "gpg: no Valid Openpgp data found." , "rc": 2, "stderr": "gpg: in Valid Openpgp data found. n", "stdout": "", "stdout_lines": []}

The . yml file corresponding to this task looks like this:

 name: Add the webupd8 APT repository key
  tags:
    - java
    - java-webupd8
  apt_key: data="{{ lookup('file', 'webupd8.key.asc') }}" state=present
  # Use a static file because right now using just an ID fails

- name: Add the webupd8 APT repository
  tags:
    - java
    - java-webupd8
  apt_repository: repo="deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" state=present

Good for what the error accuse I imagine I’m putting the wrong value in the variable apt_key ,but I have no idea what I should put in place.

PS:I am Newbie in the provision of virtual machines and the like.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.