From d58d02f1f654c8ec8a83a0f356d400fce18b08bf Mon Sep 17 00:00:00 2001 From: Lee Goolsbee Date: Mon, 25 Mar 2024 14:38:23 -0500 Subject: [PATCH] remove unneeded tasks; adjust some variables --- roles/bitbucket_mesh_config/tasks/main.yml | 15 +---- .../tasks/mesh_setup.yml | 60 +------------------ 2 files changed, 6 insertions(+), 69 deletions(-) diff --git a/roles/bitbucket_mesh_config/tasks/main.yml b/roles/bitbucket_mesh_config/tasks/main.yml index c37bd14..231fcfa 100644 --- a/roles/bitbucket_mesh_config/tasks/main.yml +++ b/roles/bitbucket_mesh_config/tasks/main.yml @@ -1,20 +1,11 @@ --- -# the owner/group on the unarchive above isn't thorough -- name: adjust permissions on the extracted directory - ansible.builtin.file: - state: directory - path: "/opt/atlassian/mesh/atlassian-bitbucket-mesh-{{ atl_product_version }}" - owner: "{{ atl_product_user }}" - group: "{{ atl_product_user }}" - recurse: yes - -- name: touch the jmx password file +- name: Touch the JMX password file ansible.builtin.file: path: "{{ atl_home_base }}/{{ atl_product_edition }}/jmx.access" state: touch - owner: "{{ atl_product_user_uid }}" - group: "{{ atl_product_user_uid }}" + owner: "{{ atl_product_user }}" + group: "{{ atl_product_user }}" mode: 0600 # assume bbdc secret exists (else fail) - setup stuff for calling bitbucket rest api and get mesh node report diff --git a/roles/bitbucket_mesh_config/tasks/mesh_setup.yml b/roles/bitbucket_mesh_config/tasks/mesh_setup.yml index c5808ac..6e10d86 100644 --- a/roles/bitbucket_mesh_config/tasks/mesh_setup.yml +++ b/roles/bitbucket_mesh_config/tasks/mesh_setup.yml @@ -1,5 +1,5 @@ --- -- name: Create Bitbucket dirs if necessary +- name: Create additional Bitbucket dirs if necessary ansible.builtin.file: path: "{{ item }}" owner: "{{ atl_product_user }}" @@ -8,66 +8,12 @@ state: directory recurse: no with_items: - - "{{ atl_home_base }}/{{ atl_product_edition }}" - - "{{ mesh_install_dir }}" - - "{{ atl_product_home }}" - "{{ atl_product_home }}/caches" - "{{ atl_product_home }}/log" -# - name: download the mesh distribution using maven -# community.general.maven_artifact: -# group_id: "com.atlassian.bitbucket.mesh" -# artifact_id: "mesh-distribution" -# extension: "tar.gz" -# version: "{{ atl_product_version }}" -# repository_url: "{{ bitbucket_mesh_maven_repo }}" -# dest: "{{ downloads_dir }}" -# keep_name: yes -# mode: "0644" -# owner: "{{ atl_product_user }}" -# group: "{{ atl_product_user }}" -# register: maven_download - -# - name: extract the downloaded artifact # noqa no-handler -# ansible.builtin.unarchive: -# src: "{{ maven_download.dest }}" -# dest: "/opt/atlassian/mesh/" -# creates: "/opt/atlassian/mesh/atlassian-bitbucket-mesh-{{ atl_product_version }}" -# mode: 0755 -# owner: "{{ atl_product_user }}" -# group: "{{ atl_product_user }}" -# register: mesh_extract -# when: -# - maven_download.changed | bool - -# the owner/group on the unarchive above isn't thorough -- name: adjust permissions on the extracted directory +- name: Enforce the permissions on the pem files ansible.builtin.file: - state: directory - path: "/opt/atlassian/mesh/atlassian-bitbucket-mesh-{{ atl_product_version }}" - owner: "{{ atl_product_user }}" - group: "{{ atl_product_user }}" - recurse: yes - -# - name: symlink to the current version # noqa no-handler -# ansible.builtin.file: -# src: "/opt/atlassian/mesh/atlassian-bitbucket-mesh-{{ atl_product_version }}" -# dest: "/opt/atlassian/mesh/current" -# state: link -# when: -# - mesh_extract.changed | bool - -- name: touch the jmx password file - ansible.builtin.file: - path: "{{ atl_home_base }}/{{ atl_product_edition }}/jmx.access" - state: touch - owner: "{{ atl_product_user }}" - group: "{{ atl_product_user }}" - mode: 0600 - -- name: enforce the permissions on the pem files - ansible.builtin.file: - path: "{{ atl_home_base }}/{{ atl_product_edition }}/config/{{ item }}" + path: "{{ atl_product_home }}/config/{{ item }}" state: touch owner: "{{ atl_product_user }}" group: "{{ atl_product_user }}"