Skip to content

Commit

Permalink
Merge pull request #5 from Oefenweb/make-it-possible-to-upload-custom…
Browse files Browse the repository at this point in the history
…-utility-scripts

Make it possible to upload custom (utility) scripts
  • Loading branch information
tersmitten authored May 17, 2018
2 parents 8a43bb0 + 61b4016 commit 7cc6490
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ python: "2.7"

env:
- ANSIBLE_VERSION=latest
- ANSIBLE_VERSION=2.5.2
- ANSIBLE_VERSION=2.5.1
- ANSIBLE_VERSION=2.5.0
- ANSIBLE_VERSION=2.4.4.0
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ None
* `percona_toolkit_table_checksum.ignore_databases`: [optional]: Ignore this list of databases (e.g. `['information_schema', 'common_schema']`)
* `percona_toolkit_table_checksum.opts`: [optional, default: `[]`]: Additional options

##### (Custom) scripts

* `percona_toolkit_script_map`: [default: `[]`]: Script declarations
* `percona_toolkit_script_map.{n}.src`: The local path of the file to copy, can be absolute or relative (e.g. `../../../files/percona-toolkit/usr/local/bin/pt-truncate-database.sh`)
* `percona_toolkit_script_map.{n}.dest`: The remote path of the file to copy (e.g. `/usr/local/bin/pt-truncate-database`)
* `percona_toolkit_script_map.{n}.owner`: The name of the user that should own the file (optional, default `root`)
* `percona_toolkit_script_map.{n}.group`: The name of the group that should own the file (optional, default `root`)
* `percona_toolkit_script_map.{n}.mode`: The mode of the file, such as 0644 (optional, default `0755`)

## Dependencies

None
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# defaults file for percona-toolkit
---
percona_toolkit_cron_jobs: []

percona_toolkit_deadlock_logger: {}
percona_toolkit_heartbeat: {}
percona_toolkit_table_checksum: {}

percona_toolkit_script_map: []
6 changes: 6 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
- percona-toolkit
- percona-toolkit-configure

- include: scripts.yml
tags:
- configuration
- percona-toolkit
- percona-toolkit-scripts

- include: jobs.yml
tags:
- configuration
Expand Down
10 changes: 10 additions & 0 deletions tasks/scripts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# tasks file for percona-server-tools
---
- name: scripts | copy files
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: "{{ item.owner | default('root') }}"
group: "{{ item.group | default('root') }}"
mode: "{{ item.mode | default('0755') }}"
with_items: "{{ percona_toolkit_script_map }}"

0 comments on commit 7cc6490

Please sign in to comment.