mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
some test changes
This commit is contained in:
parent
f56d9ebfcb
commit
5cdacccec6
@ -4,25 +4,18 @@ Migration tools
|
|||||||
# import
|
# import
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
def migrate_paths(master_or_minion = 'minion'):
|
def migrate_paths(opts):
|
||||||
'''
|
'''
|
||||||
Migrate old minion and master file paths to new ones.
|
Migrate old minion and master pki file paths to new ones.
|
||||||
'''
|
'''
|
||||||
oldsock_dir = '/var/run/salt'
|
|
||||||
newsock_dir = '/var/run/salt/{0}'.format(master_or_minion)
|
|
||||||
|
|
||||||
oldpki_dir = '/etc/salt/pki'
|
oldpki_dir = '/etc/salt/pki'
|
||||||
newpki_dir = '/etc/salt/pki/{0}'.format(master_or_minion)
|
|
||||||
|
if opts['default_include'].startswith('minion'):
|
||||||
|
newpki_dir = '/etc/salt/pki/minion'
|
||||||
|
if os.path.exists(oldpki_dir) and os.path.exists(newpki_dir):
|
||||||
|
pass
|
||||||
|
|
||||||
oldcache_dir = '/var/cache/salt'
|
|
||||||
newcache_dir = '/var/cache/salt/{0}'.format(master_or_minion)
|
|
||||||
|
|
||||||
if not os.path.exists(newsock_dir):
|
|
||||||
print 'migrate sock stuff'
|
|
||||||
|
|
||||||
if not os.path.exists(newpki_dir):
|
if not os.path.exists(newpki_dir):
|
||||||
print 'migrate pki stuff'
|
print 'migrate pki stuff'
|
||||||
|
|
||||||
if not os.path.exists(newcache_dir):
|
|
||||||
print 'migrate cache stuff'
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user