--- # Fixes the DO380 class playbooks for logging operator and related artifacts to # use the original operator catalogs rather than the do380-catalog. # # 1. make sure /usr/local/lib/ansible is there, OR extract http://materials.example.com/ansible.tgz # (examples in labtool.do380.shlib) # # 2. perform the modifications needed for logging to deploy correctly: # # - change do380-catalog to redhat-operators # /usr/local/lib/ansible/lso/set_lso.yml # /usr/local/lib/ansible/logging/files/elasticsearch-operator.yml # /usr/local/lib/ansible/logging/files/logging-operator.yml # # - remove image attribute from eventrouter # /usr/local/lib/ansible/logging/set_logging.yml # - name: Check if Ansible labs are there. stat: path: /usr/local/lib/ansible register: ansible_dir - name: Unarchive Ansible files become: yes unarchive: src: http://materials.example.com/ansible.tgz dest: /usr/local/lib/ owner: root group: root remote_src: true when: not ansible_dir.stat.exists - name: Replace all references to do380-catalog in any manifest. become: yes lineinfile: path: "{{ item }}" regexp: "(^\\s+source:) do380-catalog" backrefs: yes line: "\\1 redhat-operators" state: present loop: - /usr/local/lib/ansible/lso/set_lso.yml - /usr/local/lib/ansible/logging/files/elasticsearch-operator.yml - /usr/local/lib/ansible/logging/files/logging-operator.yml - name: Remove the IMAGE and parameters attributes from eventrouter spec. become: yes lineinfile: path: /usr/local/lib/ansible/logging/set_logging.yml regexp: "(parameters|IMAGE):" state: absent ...