|
@@ -8,8 +8,9 @@ print(salt.cmd('*', 'test.ping'))
|
|
|
for minion, ips in salt.cmd('*', 'network.ipaddrs').items():
|
|
|
print(minion, ips)
|
|
|
|
|
|
-
|
|
|
-salt.cmd('*', 'pkg.install', arg=['git'])
|
|
|
+for minion, res in salt.cmd('*', 'pkg.version', arg=('git')):
|
|
|
+ if not res:
|
|
|
+ salt.cmd('*', 'pkg.install', arg=['git'])
|
|
|
|
|
|
for minion, res in salt.cmd('*', 'git.clone', arg=['/tmp/'], kwarg={'url':'https://n1chome.uk/nee2c/salttest.git', 'name':'stest'}, full_return=True).items():
|
|
|
print(minion, res)
|