From 2164ec4d24d577e84a50bf67d548422e3b3fb71d Mon Sep 17 00:00:00 2001 From: Alex Chvatal Date: Wed, 25 Jan 2017 14:57:17 -0500 Subject: [PATCH] skip the gpg key import tasks in check mode --- tasks/rvm.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/rvm.yml b/tasks/rvm.yml index e2c3244..726c10e 100644 --- a/tasks/rvm.yml +++ b/tasks/rvm.yml @@ -24,7 +24,7 @@ - name: Import GPG keys command: 'gpg --keyserver {{ rvm1_gpg_key_server }} --recv-keys {{ rvm1_gpg_keys }}' changed_when: False - when: rvm1_gpg_keys != '' + when: not ansible_check_mode and rvm1_gpg_keys != '' register: gpg_result until: gpg_result.rc == 0 retries: 5 @@ -33,7 +33,7 @@ - name: Import GPG keys the other way shell: curl -sSL https://rvm.io/mpapis.asc | gpg --import - - when: rvm1_gpg_keys != '' and gpg_result.rc != 0 + when: not ansible_check_mode and rvm1_gpg_keys != '' and gpg_result.rc != 0 - name: Install rvm command: >