From ebcfd52347938e1aa979eb99597f032b10f731ce Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Fri, 31 May 2019 11:00:59 +1000 Subject: [PATCH] DCD-386: Convert Bitbucket startup to new general systemd role. --- aws_bitbucket_dc_node.yml | 9 +++++++++ roles/bitbucket_config/tasks/main.yml | 11 ----------- .../templates/bitbucket.service.j2 | 16 ---------------- 3 files changed, 9 insertions(+), 27 deletions(-) delete mode 100644 roles/bitbucket_config/templates/bitbucket.service.j2 diff --git a/aws_bitbucket_dc_node.yml b/aws_bitbucket_dc_node.yml index 2208284..e5da11d 100644 --- a/aws_bitbucket_dc_node.yml +++ b/aws_bitbucket_dc_node.yml @@ -8,6 +8,14 @@ atl_product_edition: "bitbucket" atl_product_user: "bitbucket" + atl_startup_systemd_params: + - "UMask=0027" + - "LimitNOFILE=4096" + - "Environment=BITBUCKET_HOME={{ atl_product_home_shared }}" + atl_startup_exec_options: + - "-fg" + - "--no-search" + roles: - role: linux_common - role: aws_common @@ -15,3 +23,4 @@ - role: product_common - role: product_install - role: bitbucket_config + - role: product_startup diff --git a/roles/bitbucket_config/tasks/main.yml b/roles/bitbucket_config/tasks/main.yml index 6473fd2..961d5b4 100644 --- a/roles/bitbucket_config/tasks/main.yml +++ b/roles/bitbucket_config/tasks/main.yml @@ -14,14 +14,3 @@ group: "root" mode: "u=rwX,g=rX,o=rX" recurse: true - -- name: "Install Bitbucket service file" - template: - src: "bitbucket.service.j2" - dest: "/etc/systemd/system/bitbucket.service" - -- name: Enable Bitbucket - service: - name: bitbucket.service - enabled: true - state: started diff --git a/roles/bitbucket_config/templates/bitbucket.service.j2 b/roles/bitbucket_config/templates/bitbucket.service.j2 deleted file mode 100644 index 001430b..0000000 --- a/roles/bitbucket_config/templates/bitbucket.service.j2 +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Atlassian Bitbucket -After=network-online.target - -[Service] -User={{ atl_product_user }} -Group={{ atl_product_user }} -UMask=0027 -LimitNOFILE=4096 -Environment=BITBUCKET_HOME={{ atl_product_home_shared }} - -ExecStart={{ atl_product_installation_current }}/bin/start-bitbucket.sh -fg --no-search -Restart=on-failure - -[Install] -WantedBy=multi-target.target