{"changed": false} on apt install, but install works fine when SSH'd in manually.

Hi,

I’m trying to install openjdk-7-jdk on Ubuntu 14.04, however I’m running into a problem:

When I run my playbook:

`

  • name: Install Java 6
    sudo: yes
    apt: name=openjdk-6-jdk state=latest install_recommends=no

`

I get: {“changed”: false}

Now if I SSH into my Vagrant box and do the usual sudo apt-get install openjdk-7-jdk, everything works just fine.

I am stumped!

Any ideas what might be breaking and/or going wrong?

Thanks in advance :slight_smile:

Well, for starters, you’re talking about installing openjdk-7, but your playbook is targeting openjdk-6… Typo?

Indeed it is a typo- sorry. I’ve been trying both to see if there was any difference- however it occurs for both.

It turned out to be a virtualbox issue. I have no idea why, but restarting my laptop fixed the issue. It’s happened on multiple occasions now. Same script, only difference between it not working and working was a reboot. How very odd.