我正在测试salt-cloud
saltify
在目标机器上部署/安装salt-minions。salt-master salt-cloud not acting idempotent
我创建了三个流浪汉机和名称他们主,奴才-01和奴才-02。
所有的机器都是这样的;
[email protected]:/home/vagrant# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
然后在主我跟着此http://repo.saltstack.com/#ubuntu 安装盐主(手动ofcourse)。
然后在主人我添加这三个文件。
在/etc/salt/cloud.providers:在/etc/salt/cloud.profiles.d
[email protected]:/etc/salt/cloud.providers.d# cat bare_metal.conf
my-saltify-config:
minion:
master: 192.168.33.10
driver: saltify
:
[email protected]:/etc/salt/cloud.profiles.d# cat saltify.conf
make_salty:
provider: my-saltify-config
script_args: git v2016.3.1
的/ etc /盐/ saltify-map
[email protected]:/etc/salt# cat saltify-map
make_salty:
- minion-01:
ssh_host: 192.168.33.11
ssh_username: vagrant
password: vagrant
- minion-02:
ssh_host: 192.168.33.12
ssh_username: vagrant
password: vagrant
然后在小喽哟我跑salt-cloud -m /etc/salt/saltify-map
这是非常缓慢,但它运行没有错误。 012_这两个小号01和小号02的键被盐师傅接受。
我可以这样做:
[email protected]:/home/vagrant# salt 'minion*' test.ping
minion-01:
True
minion-02:
True
和这一点;
[email protected]:/home/vagrant# salt-key
Accepted Keys:
minion-01
minion-02
Denied Keys:
Unaccepted Keys:
Rejected Keys:
问题;
现在当我再次执行这个salt-cloud -m /etc/salt/saltify-map
salt-master重新运行整个执行然后我有这个;
[email protected]:/home/vagrant# salt 'minion*' test.ping
minion-02:
Minion did not return. [No response]
minion-01:
Minion did not return. [No response]
和这个;
[email protected]:/etc/salt# salt-key
Accepted Keys:
minion-01
minion-02
Denied Keys:
minion-01
minion-02
Unaccepted Keys:
Rejected Keys:
总之盐云不做功幂等。
我在做什么错?
第二个问题是,虽然在第一次运行salt-cloud -m /etc/salt/saltify-map
安装和接受的关键奴才-01和奴才-02对盐主,但仆从机器已经沿安装了所有这些事情salt-minion
[email protected]:/home/vagrant# salt
salt salt-call salt-cp salt-master salt-proxy salt-ssh salt-unity
salt-api salt-cloud salt-key salt-minion salt-run salt-syndic
如何确保仅安装了salt-minion
。
感谢。
PS:
[email protected]:/etc/salt# salt-master --version
salt-master 2016.3.1 (Boron)
那就是我。 :) – Nagri