Skip to content

Commit

Permalink
deploy: support set authorized key
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyass committed Sep 11, 2018
1 parent a500878 commit 9b872a3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
8 changes: 8 additions & 0 deletions deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
---
- hosts: all
tasks:
- name: set authorized key
authorized_key:
user: "{{ ansible_user }}"
key: "{{ lookup('file', '/home/{{ ansible_user }}/.ssh/id_rsa.pub') }}"
state: present

- name: check config locally
hosts: localhost
any_errors_fatal: true
Expand Down
21 changes: 11 additions & 10 deletions inventory.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
[radon:children]
master
slave

[master]
192.168.0.29

[slave]

[radon:children]
master
slave
[mysql:children]
backend
backup

###server_id must be defferent
[backend]
Expand All @@ -14,10 +18,6 @@ slave
[backup]
192.168.0.27 server_id=19216827

[mysql:children]
backend
backup

[monitor]
192.168.0.29

Expand Down Expand Up @@ -57,7 +57,10 @@ level = INFO
monitor_port = 13308

radon_usr = usr
radon_passwd = zhu1241jie
radon_passwd = 123456

backend_max_conn = 1024
backup_max_conn = 1024

### support mysql5.7
[mysql:vars]
Expand Down Expand Up @@ -97,8 +100,6 @@ retry_stagger = 5
mysql_port = 3306
mysql_user = root
mysql_passwd = 123456
backend_max_conn = 1024
backup_max_conn = 1024

# default configuration for multiple host groups and roles
node_exporter_port = 9100

0 comments on commit 9b872a3

Please sign in to comment.