Hi Pankaj,
On 2014-12-05 08:09, Mathieu Le Marec - Pasquet wrote:
> On 03/12/2014 08:10, pankaj ghadge wrote:
>
>> Hi all,
>>
>> I have 3 minion under one project and I want to share public key of
>> each minion with other minions, so user will able to login/copy
>> files between them without credentials.
>>
>> As I know minions can't communicate with each other, but via master
>> is it possible?
>>
>> 1) Master send command to minion to generate ssh key.
>> 2) Copy ssh public key to master.
>> 3) Copy ssh public key to remaining minions.
>> 4) Same procedure for other minions.
>>
>> or is there any other solutions for this.
>>
>> Here I don't want to generate ssh key manually.
>>
>> Thanks a lot.
>> --
As Mathieu noted:
> Use an ext pillar for exposing the key (either pub/priv or both) to
> appropriate minions as a key and generate the file content from the
> value.
I would recommend making the key available through pillar, either the
standard .sls or a ext_pillar.
To use ext_pillar.. A simple script, in any language, would return the
current value of the pub key in a particular file path, and return that
to ext_pillar to be consumed in your formula. While that is a more
automated solution, you could also simplify and just put the key in .sls
pillar. You can then used that pub key in pillar as part of ssh/file
salt states as needed.
Good luck.