--- - name: check if Opera is installed stat: path: "{{ opera_path }}/code/bin/opera_manager" register: stat_result - name: copy Opera files to local machine become: yes become_user: gethmann # Hack since root is not allowed to view /mnt/las-archiv1 copy: src: /mnt/las-archiv1/system/Opera/18/Opera_RHEL7.tar.bz dest: /tmp remote_src: True when: stat_result.stat.exists == False - name: unzip Opera become: yes unarchive: src: /tmp/Opera_RHEL7.tar.bz dest: /usr/local/share/ creates: "{{ opera_path }}/code/bin/opera_manager" remote_src: yes - name: install dependencies become: yes dnf: name: "{{ item }}" state: present when: (ansible_distribution == "Fedora" and ansible_distribution_major_version >= "24") with_items: - 'libpng15' - 'xcb-util-image' - 'xcb-util-wm' - 'xcb-util-keysyms' - 'xcb-util-renderutil' - 'xterm' # Work around for Fedora 25 vs. CentOS 7 - name: create dir for CentOS 7 libs become: yes file: name: "{{ opera_path }}/CentOS7libs" state: directory group: users mode: g+rwx when: (ansible_distribution == "Fedora" and ansible_distribution_major_version >= "22") - name: copy libraries from real CentOS 7 host (server) become: yes become_user: gethmann # see above copy: src: "/mnt/las-archiv1/system/Opera/18/CentOS7libs/{{ item.src }}" dest: "{{ opera_path }}/CentOS7libs/{{ item.dest }}" remote_src: True with_items: - { dest: 'libicui18n.so.50', src: 'libicui18n.so.50.1.2' } - { dest: 'libicuuc.so.50', src: 'libicuuc.so.50.1.2' } - { dest: 'libicudata.so.50', src: 'libicudata.so.50.1.2' } when: (ansible_distribution == "Fedora" and ansible_distribution_major_version >= "22") - name: make CentOS7 libs available become: yes copy: dest: /etc/ld.so.conf.d/opera.conf content: "{{ opera_path }}/CentOS7libs" backup: yes notify: ldconfig when: (ansible_distribution == "Fedora" and ansible_distribution_major_version >= "22") - name: install RHEL 6 deps become: yes dnf: name: hwloc state: present when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "6") or (ansible_distribution == "RHEL" and ansible_distribution_major_version == "6") - name: install RHEL 7 deps become: yes dnf: name: hwloc-libs state: present when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "7") or (ansible_distribution == "RHEL" and ansible_distribution_major_version == "7") or (ansible_distribution == "Fedora" and ansible_distribution_major_version >= "24") - name: copy profile.d become: yes copy: src: opera.sh dest: /etc/profile.d/opera.sh backup: yes owner: root group: root mode: 0744 notify: run custom - name: copy wrapper scripts become: yes copy: src: "{{ item }}" dest: /usr/local/bin mode: ugo+x with_items: - "opera-mod.sh" - "opera-post.sh" - "opera-manager"