91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

saltstack 執行結果返回到mysql

發布時間:2020-08-06 13:45:13 來源:網絡 閱讀:3241 作者:潘闊 欄目:MySQL數據庫

系統:ubuntu 17.04

官方文檔https://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.mysql.html

master
(salt-master , mysql,python2.7-mysql)

syndic
(salt-master,mysql-client,salt-syndic,python2.7-mysql)

minion
(salt-minion,mysql-client,python2.7-mysql)

master

#cat /etc/salt/master|grep -v "#" |grep -v "^ *$"
ipv6: False
interface: 192.168.90.177
auto_accept: True
state_top: top.sls
order_masters: True
return: mysql

################################mysql##################################
CREATE DATABASE salt
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;

USE salt;

DROP TABLE IF EXISTS jids;
CREATE TABLE jids (
jid varchar(255) NOT NULL,
load mediumtext NOT NULL,
UNIQUE KEY jid (jid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS salt_returns;
CREATE TABLE salt_returns (
fun varchar(50) NOT NULL,
jid varchar(255) NOT NULL,
return mediumtext NOT NULL,
id varchar(255) NOT NULL,
success varchar(10) NOT NULL,
full_ret mediumtext NOT NULL,
alter_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
KEY id (id),
KEY jid (jid),
KEY fun (fun)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS salt_events;
CREATE TABLE salt_events (
id BIGINT NOT NULL AUTO_INCREMENT,
tag varchar(255) NOT NULL,
data varchar(1024) NOT NULL,
alter_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id),
KEY tag (tag)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

mysql> use salt
mysql> show tables;
+----------------+
| Tables_in_salt |
+----------------+
| jids |
| salt_events |
| salt_returns |
+----------------+

grant all on salt.* to salt@'%' identified by 'salt';

(此為ubuntu上的mysql)
root@jy-KVM1:~# cat /etc/mysql/mysql.conf.d/mysqld.cnf |grep bind
#bind-address = 127.0.0.1 #注釋掉,允許其他機器訪問

#########################################################################

syndic

#cat /etc/salt/master|grep -v "#" |grep -v "^ *$"
ipv6: False
auto_accept: True
file_roots:
base:

  • /etc/salt/base
    prod:
  • /etc/salt/prod
    syndic_master: 192.168.90.177

minion

#cat /etc/salt/minion|grep -v "#" |grep -v "^ *$"
master: 192.168.90.178
id: 192.168.90.179
mysql.host: '192.168.90.177'
mysql.user: 'salt'
mysql.pass: 'salt'
mysql.db: 'salt'
mysql.port: 3306

在master上執行

#salt '*' test.ping

查看數據庫

6. row
fun: test.ping
jid: 20171204130021772990
return: true
id: 192.168.90.179
success: 1
full_ret: {"fun_args": [], "jid": "20171204130021772990", "return": true, "retcode": 0, "success": true, "fun": "test.ping", "id": "192.168.90.179"}
alter_time: 2017-12-04 13:00:23
6 rows in set (0.01 sec)

ERROR:
No query specified

mysql>

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

榆林市| 平陆县| 西乌珠穆沁旗| 黔西县| 荔浦县| 类乌齐县| 延寿县| 板桥市| 泗水县| 普陀区| 张家川| 滕州市| 明星| 即墨市| 丰县| 息烽县| 临安市| 云龙县| 赤城县| 诸城市| 双流县| 和硕县| 周口市| 六盘水市| 甘南县| 禄劝| 玉树县| 自治县| 井研县| 昌图县| 阿勒泰市| 荔波县| 新昌县| 牟定县| 仁怀市| 桦甸市| 孟村| 江门市| 前郭尔| 渝北区| 凤山市|