diff --git a/ansible1/roles/packages/tasks/main.yml b/ansible1/roles/packages/tasks/main.yml index 5250c4db3..09284a0ad 100644 --- a/ansible1/roles/packages/tasks/main.yml +++ b/ansible1/roles/packages/tasks/main.yml @@ -5,7 +5,13 @@ cache_valid_time: 86400 - name: Install system dependencies - run: sudo apt-get install -y libvips42 libvips-dev imagemagick + apt: + name: + - libvips42 + - libvips-dev + - imagemagick + state: present + update_cache: yes - name: Define ruby_build_packages set_fact: diff --git a/ansible1/roles/packages/tasks/rvm.yml b/ansible1/roles/packages/tasks/rvm.yml index 1cd226258..8de4385b5 100644 --- a/ansible1/roles/packages/tasks/rvm.yml +++ b/ansible1/roles/packages/tasks/rvm.yml @@ -23,17 +23,17 @@ - name: Import GPG keys from keyservers shell: 'gpg --batch --keyserver {{ item }} --recv-keys {{ rvm1_gpg_keys }}' + register: gpg_import changed_when: False check_mode: False with_items: '{{ rvm1_gpg_key_servers }}' - register: gpg_import when: not ansible_check_mode and rvm1_gpg_keys != '' and (gpg_import is not defined or gpg_import.rc != 0) ignore_errors: True - name: Was GPG import from keyservers succesfull? set_fact: gpg_imported_from={{ item.item }} - when: "'rc' in item and item.rc == 0" - with_items: "{{ gpg_import.results }}" + with_items: "{{ gpg_import.results | default([]) }}" + when: item.rc is defined and item.rc == 0 - name: Import GPG keys from rvm.io, if keyservers failed shell: 'curl -sSL https://rvm.io/{{ item }} | gpg --batch --import -' diff --git a/ansible1/roles/packages/vars/main.yml b/ansible1/roles/packages/vars/main.yml index 201b3c863..fbd280ea8 100644 --- a/ansible1/roles/packages/vars/main.yml +++ b/ansible1/roles/packages/vars/main.yml @@ -115,6 +115,7 @@ rvm1_rvm: "{{ rvm1_install_path }}/bin/rvm" rvm1_temp_download_path: "/tmp" rvm1_rvm_latest_installer: "https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer" rvm1_gpg_keys: "409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB" +rvm1_gpg_key_server: "hkp://keys.openpgp.org" rvm1_gpg_key_servers: - "{{ rvm1_gpg_key_server }}" - hkp://pgp.mit.edu