Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
[master (root-commit) c6d30c9] first try
Committer: root root@saltmaster.(none)
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
my master config without enable gitfs
rpm -qa|grep salt
salt-2014.1.0-1.el6.noarch
grep '^[^#]' /etc/salt/master
default_include: master.d/*.conf interface: 192.168.10.231 file_recv: True file_roots: base:
when i run job ,it's ok
salt 'saltslave' state.highstate
saltslave:
Summary
Succeeded: 1
Failed: 0
Total: 1
create a new repo in git ,and put all file in /srv into it
git clone git@192.168.10.240:mysaltrepo.git
Initialized empty Git repository in /opt/mysaltrepo/.git/ warning: You appear to have cloned an empty repository.
cd mysaltrepo/
cp -av /srv/* .
/srv/salt' ->
./salt'/srv/salt/top.sls' ->
./salt/top.sls'/srv/salt/mytest' ->
./salt/mytest'/srv/salt/mytest/mytest.sh' ->
./salt/mytest/mytest.sh'/srv/salt/mytest/init.sls' ->
./salt/mytest/init.sls'/srv/top.sls' ->
./top.sls'git add .
git commit -m "first try"
[master (root-commit) c6d30c9] first try Committer: root root@saltmaster.(none) Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly:
If the identity used for this commit is wrong, you can fix it with:
4 files changed, 12 insertions(+), 0 deletions(-) create mode 100644 salt/mytest/init.sls create mode 100644 salt/mytest/mytest.sh create mode 100644 salt/top.sls create mode 100644 top.sls
push to remote git server
git push origin master
Counting objects: 8, done. Compressing objects: 100% (5/5), done. Writing objects: 100% (8/8), 557 bytes, done. Total 8 (delta 0), reused 0 (delta 0) To git@192.168.10.240:mysaltrepo.git
uncomment following info in /etc/salt/master
gitfs_remotes:
and move /srv to /srv_del
mv /srv /srv_del
and restart salt master
salt 'saltslave' state.highstate
saltslave:
Data failed to compile: