summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorGeorg Pfuetzenreuter2023-01-21 18:53:50 +0100
committerGeorg Pfuetzenreuter2023-01-21 18:54:58 +0100
commita42961e98235a1ed43fe85be52022723bf2eb3f8 (patch)
treeed64b5d7f51933b99c1f54d35c1b763e23ddb88d /bin
parent97db5ef6db7952d8f7da9e46559a352736d4cb4d (diff)
downloadsalt-a42961e98235a1ed43fe85be52022723bf2eb3f8.tar.gz
salt-a42961e98235a1ed43fe85be52022723bf2eb3f8.tar.bz2
salt-a42961e98235a1ed43fe85be52022723bf2eb3f8.zip
Update mocking base
- adapt preparation script to new environment - add sample mocking pillar including README Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/prepare_mock.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/prepare_mock.py b/bin/prepare_mock.py
index 982ca32..245113a 100755
--- a/bin/prepare_mock.py
+++ b/bin/prepare_mock.py
@@ -6,8 +6,9 @@ import socket
iddir = 'pillar/id/'
secretiddir = 'pillar/secret/id/'
-baseidfile = 'atvkdev02_home_lysergic_dev.sls'
+baseidfile = 'pillar/mock/example.sls'
myidfile = socket.gethostname() + '.sls'
-shutil.copyfile(iddir + baseidfile, iddir + myidfile)
-shutil.copyfile(secretiddir + baseidfile, secretiddir + myidfile)
+shutil.copyfile(baseidfile, os.path.join(iddir, myidfile))
+os.makedirs(secretiddir)
+shutil.copyfile(baseidfile, os.path.join(secretiddir, myidfile))