]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.simple/src/main/resources/org/argeo/slc/lib/linux/redhat.xml
SLC Flow Spring XML format v1.2
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / resources / org / argeo / slc / lib / linux / redhat.xml
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"
12 xsi:schemaLocation="
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">
16
17 <bean id="hostManager" class="org.argeo.slc.lib.linux.RedhatHostManager">
18 <property name="sshTarget" ref="sshTarget" />
19 <property name="host" ref="host" />
20 </bean>
21
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" />
25
26 <bean flow:as-flow="system/reboot" p:command="shutdown -r now"
27 p:sshTarget-ref="sshTarget" class="org.argeo.slc.jsch.RemoteExec" />
28
29 <bean flow:as-flow="system/shutdown" p:command="shutdown -h now"
30 p:sshTarget-ref="sshTarget" class="org.argeo.slc.jsch.RemoteExec" />
31
32 <bean flow:as-flow="system/packages/install" class="org.argeo.slc.core.execution.tasks.MethodCall"
33 p:target-ref="hostManager" p:method="installPackages" />
34
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" />
40 </bean>
41 </property>
42 </bean>
43
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" />
46
47 <flow:spec id="authconfig.spec">
48 <flow:primitive name="ldapserver" />
49 <flow:primitive name="ldapbasedn" />
50 </flow:spec>
51
52 <flow:flow spec="">
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">
58 <list>
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>
68 </list>
69 </property>
70 </bean>
71 </property>
72 </bean>
73 </flow:flow>
74
75 </beans>