I have the following defined in roles/apple/default/main.yml
epel_repo: true
I have the following defined in roles/apple/tasks/main.yml
- command: rpm -Uvh {{ epel_url }}
when: epel_repo
The load_driver already has epel installed so I am doing the following:
- hosts: load_driver
user: root
vars_files: - vars/globals.yml
- roles/stuff/defaults/main.yml
roles: - { role: apple, epel_repo: false }
However, the following occurs:
19:59:01 TASK: [apple | command rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm] ***
19:59:01 failed: [load-driver] => {“changed”: true, “cmd”: [“rpm”, “-Uvh”, “http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm”], “delta”: “0:00:04.500043”, “end”: “2014-06-28 19:58:59.358809”, “item”: “”, “rc”: 1, “start”: “2014-06-28 19:58:54.858766”}
19:59:01 stderr: package epel-release-6-8.noarch is already installed
19:59:01 stdout: Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
19:59:01 Preparing… ##################################################
19:59:01
19:59:01 FATAL: all hosts have already failed – aborting
What am I doing wrong? There is a bunch of other stuff occurring in the role apple which I want to occur. I just want the rpm command not to execute.
Thanks.
Mike