1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!-- Copyright (C) 2007-2012 Mathieu Baudier Licensed under the Apache License,
3 Version 2.0 (the "License"); you may not use this file except in compliance
4 with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
5 Unless required by applicable law or agreed to in writing, software distributed
6 under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
7 OR CONDITIONS OF ANY KIND, either express or implied. See the License for
8 the specific language governing permissions and limitations under the License. -->
9 <beans xmlns=
"http://www.springframework.org/schema/beans"
10 xmlns:
xsi=
"http://www.w3.org/2001/XMLSchema-instance" xmlns:
p=
"http://www.springframework.org/schema/p"
11 xmlns:
aop=
"http://www.springframework.org/schema/aop" xmlns:
flow=
"http://www.argeo.org/schema/slc-flow"
13 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
14 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
15 http://www.argeo.org/schema/slc-flow http://www.argeo.org/schema/slc-flow-1.2.xsd">
17 <bean id=
"hostManager" class=
"org.argeo.slc.lib.linux.RedhatHostManager">
18 <property name=
"sshTarget" ref=
"sshTarget" />
19 <property name=
"host" ref=
"host" />
22 <!-- Execution Flows -->
23 <bean flow:
as-flow=
"deployConfig" class=
"org.argeo.slc.core.execution.tasks.MethodCall"
24 p:
target-ref=
"hostManager" p:
method=
"deployConfig" />
26 <bean flow:
as-flow=
"system/reboot" p:
command=
"shutdown -r now"
27 p:
sshTarget-ref=
"sshTarget" class=
"org.argeo.slc.jsch.RemoteExec" />
29 <bean flow:
as-flow=
"system/shutdown" p:
command=
"shutdown -h now"
30 p:
sshTarget-ref=
"sshTarget" class=
"org.argeo.slc.jsch.RemoteExec" />
32 <bean flow:
as-flow=
"system/packages/install" class=
"org.argeo.slc.core.execution.tasks.MethodCall"
33 p:
target-ref=
"hostManager" p:
method=
"installPackages" />
35 <bean flow:
as-flow=
"system/packages/update" p:
sshTarget-ref=
"sshTarget"
36 class=
"org.argeo.slc.jsch.RemoteExec">
37 <property name=
"systemCall">
38 <bean class=
"org.argeo.slc.core.execution.tasks.SystemCall">
39 <property name=
"cmd" value=
"yum -y update" />
44 <bean flow:
as-flow=
"system/security/firewall" p:
script=
"osgibundle:/scripts/firewall.sh"
45 p:
sshTarget-ref=
"sshTarget" class=
"org.argeo.slc.jsch.RemoteExec" />
47 <flow:spec id=
"authconfig.spec">
48 <flow:primitive name=
"ldapserver" />
49 <flow:primitive name=
"ldapbasedn" />
53 <bean flow:
as-flow=
"system/security/authconfig" p:
sshTarget-ref=
"sshTarget"
54 class=
"org.argeo.slc.jsch.RemoteExec">
55 <property name=
"systemCall">
56 <bean class=
"org.argeo.slc.core.execution.tasks.SystemCall">
57 <property name=
"command">
59 <value>authconfig
</value>
60 <value>--enableldap
</value>
61 <value>--enableldapauth
</value>
62 <value>--enablecache
</value>
63 <value>--enablemkhomedir
</value>
64 <value>--ldapserver=@{ldapserver}
</value>
65 <value>--ldapbasedn=@{ldapbasedn}
</value>
66 <value>--passalgo=sha256
</value>
67 <value>--updateall
</value>