wlyyb521 发表于 2018-1-3 21:34:47

SaltStack本地管理无master模式-第八篇

root@linux-node1 base]# salt-call --local state.sls web.tomcat  
Loading fresh modules
for state activity  
Fetching
file from saltenv 'base', ** done ** 'web/tomcat.sls'  
Running state [java
-1.8.0-openjdk] at time 19:19:34.066323  
Executing state pkg.installed
for java-1.8.0-openjdk  
Executing command [
'rpm', '-qa', '--queryformat', '%{NAME}_|-%{EPOCH}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-(none)\n'] in directory '/root'  
Executing command [
'repoquery', '--plugins', '--queryformat', '%{NAME}_|-%{ARCH}', '--pkgnarrow=all', '--all'] in directory '/root'  
Executing command [
'yum', '--quiet', 'clean', 'expire-cache'] in directory '/root'  
Executing command [
'yum', '--quiet', 'check-update'] in directory '/root'  
Executing command [
'yum', '-y', 'install', 'java-1.8.0-openjdk'] in directory '/root'  
Executing command [
'rpm', '-qa', '--queryformat', '%{NAME}_|-%{EPOCH}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-(none)\n'] in directory '/root'  
Installed Packages:
  

'nss-pem' changed from 'absent' to '1.0.3-4.el7'  
'nss-tools' changed from '3.21.0-9.el7_2' to '3.28.4-15.el7_4'
  
'libXi' changed from 'absent' to '1.7.9-1.el7'
  
'python-javapackages' changed from 'absent' to '3.4.1-11.el7'
  
'xorg-x11-font-utils' changed from 'absent' to '1:7.5-20.el7'
  
'libXcomposite' changed from 'absent' to '0.4.4-4.1.el7'
  
'libICE' changed from 'absent' to '1.0.9-9.el7'
  
'nss-sysinit' changed from '3.21.0-9.el7_2' to '3.28.4-15.el7_4'
  
'copy-jdk-configs' changed from 'absent' to '2.2-3.el7'
  
'tzdata-java' changed from 'absent' to '2017b-1.el7'
  
'libXrender' changed from 'absent' to '0.9.10-1.el7'
  
'lksctp-tools' changed from 'absent' to '1.0.17-2.el7'
  
'xorg-x11-fonts-Type1' changed from 'absent' to '7.5-9.el7'
  
'libXfont' changed from 'absent' to '1.5.2-1.el7'
  
'chkconfig' changed from '1.3.61-5.el7_2.1' to '1.7.4-1.el7'
  
'libfontenc' changed from 'absent' to '1.1.3-3.el7'
  
'java-1.8.0-openjdk' changed from 'absent' to '1:1.8.0.144-0.b01.el7_4'
  
'python-lxml' changed from 'absent' to '3.2.1-4.el7'
  
'javapackages-tools' changed from 'absent' to '3.4.1-11.el7'
  
'java-1.8.0-openjdk-headless' changed from 'absent' to '1:1.8.0.144-0.b01.el7_4'
  
'nss' changed from '3.21.0-9.el7_2' to '3.28.4-15.el7_4'
  
'libXext' changed from 'absent' to '1.3.3-3.el7'
  
'nspr' changed from '4.11.0-1.el7_2' to '4.13.1-1.0.el7_3'
  
'nss-util' changed from '3.21.0-2.2.el7_2' to '3.28.4-3.el7'
  
'giflib' changed from 'absent' to '4.1.6-9.el7'
  
'libXtst' changed from 'absent' to '1.2.3-1.el7'
  
'nss-softokn' changed from '3.16.2.3-14.2.el7_2' to '3.28.3-8.el7_4'
  
'libSM' changed from 'absent' to '1.2.2-2.el7'
  
'nss-softokn-freebl' changed from '3.16.2.3-14.2.el7_2' to '3.28.3-8.el7_4'
  
'ttmkfdir' changed from 'absent' to '3.0.9-42.el7'
  

  
Loading fresh modules for state activity
  
Completed state at time 19:24:17.648075
  
Running state at time 19:24:17.654621
  
Executing state file.managed for /usr/local/src/apache-tomcat-8.0.46.tar.gz
  
Fetching file from saltenv 'base', ** done ** 'web/files/apache-tomcat-8.0.46.tar.gz'
  
File changed:
  
New file
  
Completed state at time 19:24:17.811524
  
Running state at time 19:24:17.812426
  
Executing state cmd.run for cd /usr/local/src && tar zxf apache-tomcat-8.0.46.tar.gz && mv apache-tomcat-8.0.46 /usr/local/ && ln -s /usr/local/apache-tomcat-8.0.46 /usr/local/tomcat
  
Executing command 'test -L /usr/local/tomcat && test -d /usr/local/apache-tomcat-8.0.46' in directory '/root'
  
Executing command 'cd /usr/local/src && tar zxf apache-tomcat-8.0.46.tar.gz && mv apache-tomcat-8.0.46 /usr/local/ && ln -s /usr/local/apache-tomcat-8.0.46 /usr/local/tomcat' in directory '/root'
  
{'pid': 18672, 'retcode': 0, 'stderr': '', 'stdout': ''}
  
Completed state at time 19:24:18.311686
  
local:
  
----------
  
ID: jdk-install
  
Function: pkg.installed
  
Name: java-1.8.0-openjdk
  
Result: True
  
Comment: The following packages were installed/updated: java-1.8.0-openjdk
  
Started: 19:19:34.066323
  
Duration: 283581.752 ms
  
Changes:
  
----------
  
chkconfig:
  
----------
  
new:
  
1.7.4-1.el7
  
old:
  
1.3.61-5.el7_2.1
  
copy-jdk-configs:
  
----------
  
new:
  
2.2-3.el7
  
old:
  
giflib:
  
----------
  
new:
  
4.1.6-9.el7
  
old:
  
java-1.8.0-openjdk:
  
----------
  
new:
  
1:1.8.0.144-0.b01.el7_4
  
old:
  
java-1.8.0-openjdk-headless:
  
----------
  
new:
  
1:1.8.0.144-0.b01.el7_4
  
old:
  
javapackages-tools:
  
----------
  
new:
  
3.4.1-11.el7
  
old:
  
libICE:
  
----------
  
new:
  
1.0.9-9.el7
  
old:
  
libSM:
  
----------
  
new:
  
1.2.2-2.el7
  
old:
  
libXcomposite:
  
----------
  
new:
  
0.4.4-4.1.el7
  
old:
  
libXext:
  
----------
  
new:
  
1.3.3-3.el7
  
old:
  
libXfont:
  
----------
  
new:
  
1.5.2-1.el7
  
old:
  
libXi:
  
----------
  
new:
  
1.7.9-1.el7
  
old:
  
libXrender:
  
----------
  
new:
  
0.9.10-1.el7
  
old:
  
libXtst:
  
----------
  
new:
  
1.2.3-1.el7
  
old:
  
libfontenc:
  
----------
  
new:
  
1.1.3-3.el7
  
old:
  
lksctp-tools:
  
----------
  
new:
  
1.0.17-2.el7
  
old:
  
nspr:
  
----------
  
new:
  
4.13.1-1.0.el7_3
  
old:
  
4.11.0-1.el7_2
  
nss:
  
----------
  
new:
  
3.28.4-15.el7_4
  
old:
  
3.21.0-9.el7_2
  
nss-pem:
  
----------
  
new:
  
1.0.3-4.el7
  
old:
  
nss-softokn:
  
----------
  
new:
  
3.28.3-8.el7_4
  
old:
  
3.16.2.3-14.2.el7_2
  
nss-softokn-freebl:
  
----------
  
new:
  
3.28.3-8.el7_4
  
old:
  
3.16.2.3-14.2.el7_2
  
nss-sysinit:
  
----------
  
new:
  
3.28.4-15.el7_4
  
old:
  
3.21.0-9.el7_2
  
nss-tools:
  
----------
  
new:
  
3.28.4-15.el7_4
  
old:
  
3.21.0-9.el7_2
  
nss-util:
  
----------
  
new:
  
3.28.4-3.el7
  
old:
  
3.21.0-2.2.el7_2
  
python-javapackages:
  
----------
  
new:
  
3.4.1-11.el7
  
old:
  
python-lxml:
  
----------
  
new:
  
3.2.1-4.el7
  
old:
  
ttmkfdir:
  
----------
  
new:
  
3.0.9-42.el7
  
old:
  
tzdata-java:
  
----------
  
new:
  
2017b-1.el7
  
old:
  
xorg-x11-font-utils:
  
----------
  
new:
  
1:7.5-20.el7
  
old:
  
xorg-x11-fonts-Type1:
  
----------
  
new:
  
7.5-9.el7
  
old:
  
----------
  
ID: tomcat-install
  
Function: file.managed
  
Name: /usr/local/src/apache-tomcat-8.0.46.tar.gz
  
Result: True
  
Comment: File /usr/local/src/apache-tomcat-8.0.46.tar.gz updated
  
Started: 19:24:17.654621
  
Duration: 156.903 ms
  
Changes:
  
----------
  
diff:
  
New file
  
mode:
  
0755
  
----------
  
ID: tomcat-install
  
Function: cmd.run
  
Name: cd /usr/local/src && tar zxf apache-tomcat-8.0.46.tar.gz && mv apache-tomcat-8.0.46 /usr/local/ && ln -s /usr/local/apache-tomcat-8.0.46 /usr/local/tomcat
  
Result: True
  
Comment: Command "cd /usr/local/src && tar zxf apache-tomcat-8.0.46.tar.gz && mv apache-tomcat-8.0.46 /usr/local/ && ln -s /usr/local/apache-tomcat-8.0.46 /usr/local/tomcat" run
  
Started: 19:24:17.812426
  
Duration: 499.26 ms
  
Changes:
  
----------
  
pid:
  
18672
  
retcode:
  
0
  
stderr:
  
stdout:
  

  
Summary
  
------------
  
Succeeded: 3 (changed=3)
  
Failed:    0
  
------------
  
Total states run:   3
页: [1]
查看完整版本: SaltStack本地管理无master模式-第八篇