-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PMM-12529 provide a playbook to install pmm-client
- Loading branch information
Showing
5 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
update/ansible/playbook/tasks/roles/pmm-client/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
# This role installs pmm-client. | ||
- name: Get the image version | ||
slurp: | ||
src: /usr/share/percona-dashboards/VERSION | ||
register: image_version_file | ||
|
||
- name: Set the PMM image version | ||
set_fact: | ||
pmm_image_version: "{{ image_version_file['content'] | b64decode | trim }}" | ||
|
||
- name: Download and unpack the tarball | ||
unarchive: | ||
src: "https://www.percona.com/downloads/pmm2/{{ pmm_image_version }}/binary/tarball/pmm2-client-{{ pmm_image_version }}.tar.gz" | ||
dest: /tmp/pmm-client/ | ||
copy: no | ||
remote_src: true | ||
|
||
- name: Create a directory for pmm-client | ||
file: | ||
path: /usr/local/percona/pmm2 | ||
state: directory | ||
owner: pmm | ||
group: pmm | ||
mode: 0755 | ||
|
||
- name: Install the client | ||
command: env PMM_USER=pmm PMM_GROUP=pmm /tmp/pmm-client/install_tarball | ||
|
||
- name: Remove the tarball | ||
file: | ||
path: /tmp/pmm-client | ||
state: absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters