-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update for #68: add node architecture
Showing
8 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
ansible/roles/redis-standalone/files/etc/confd/templates/redis-server.sh/01.common.func.tmpl
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,11 @@ | ||
getSlavePriority(){ | ||
local mySid="{{ getv "/host/sid" }}" | ||
local ourSid="$(echo "{{ range gets "/hosts/*/sid" }} | ||
{{- printf .Value }} | ||
{{ end }}" |sort -n)" | ||
local sid counter=0; for sid in $ourSid;do | ||
counter=$(($counter+1)) | ||
[[ "$sid" == "$mySid" ]] && break | ||
done | ||
if [[ $counter -le 3 ]];then echo 100; else echo 0;fi | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,7 +98,10 @@ | |
"default": 1, | ||
"range": [ | ||
1, | ||
3 | ||
3, | ||
5, | ||
7, | ||
9 | ||
], | ||
"required": "yes" | ||
} | ||
|
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