| 1 | --- |
| 2 | - name: Ensure common_node patterns are installed. |
| 3 | zypper: "name={{ common_node_patterns }} type=pattern state=present update_cache=yes" |
| 4 | |
| 5 | - name: Ensure common_node packages are installed. |
| 6 | zypper: "name={{ common_node_packages }} type=package state=present update_cache=yes" |
| 7 | |
| 8 | - name: Install maven from upstream binary |
| 9 | when: ansible_distribution_major_version == "12" |
| 10 | block: |
| 11 | - name: Create directory in /opt |
| 12 | ansible.builtin.file: |
| 13 | path: '/opt/apache' |
| 14 | state: 'directory' |
| 15 | - name: Download release |
| 16 | ansible.builtin.get_url: |
| 17 | url: 'https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz' |
| 18 | checksum: 'sha512:https://downloads.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz.sha512' |
| 19 | dest: '/opt/apache' |
| 20 | - name: Unarchive release |
| 21 | ansible.builtin.unarchive: |
| 22 | dest: '/opt/apache/' |
| 23 | src: '/opt/apache/apache-maven-3.9.6-bin.tar.gz' |
| 24 | remote_src: true |
| 25 | creates: '/opt/apache/apache-maven-3.9.6' |
| 26 | - name: Link /opt/apache/maven to latest version |
| 27 | ansible.builtin.file: |
| 28 | dest: '/opt/apache/maven' |
| 29 | state: 'link' |
| 30 | src: '/opt/apache/apache-maven-3.9.6' |