From ecce5e6f8a6fb3d0619718f2e490459ef8385425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Sochacki?= Date: Thu, 24 Oct 2013 11:18:37 +0200 Subject: [PATCH] Fix error createfile --- ansible_commands.txt | 10 ++++ client-bin/install.sh | 2 +- hosts | 47 +++++++++++++++++-- webapt/build.sbt | 2 +- .../src/main/scala/pl/brosbit/MyService.scala | 2 +- 5 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 ansible_commands.txt diff --git a/ansible_commands.txt b/ansible_commands.txt new file mode 100644 index 0000000..290674e --- /dev/null +++ b/ansible_commands.txt @@ -0,0 +1,10 @@ +#polecenia ansible + +#pingowanie +ansible all -m ping + +#uruchamianie komendy +ansible all -a "comand full" --user=administrator -K + +#instalacja pakietu +ansible all -m apt -a "pkg=eclipse state=present" --user=administrator -K diff --git a/client-bin/install.sh b/client-bin/install.sh index a97d095..f7b9079 100755 --- a/client-bin/install.sh +++ b/client-bin/install.sh @@ -30,7 +30,7 @@ cp pinger $BINARY_PATH echo "#!/bin/sh" > $INITD_PATH echo "#start pinger-ansible" >> $INITD_PATH echo " " >> $INITD_PATH -echo "/usr/bin/pinger-ansible" >> $INITD_PATH +echo "/usr/bin/pinger-ansible &" >> $INITD_PATH echo " " >> $INITD_PATH ln -s $INITD_PATH /etc/rc5.d/S78pinger-ansible diff --git a/hosts b/hosts index 14aff86..a0a6332 100644 --- a/hosts +++ b/hosts @@ -1,6 +1,45 @@ -[ms-laptop] -127.0.0.1 -[misiak] -127.0.0.1 +[PC14] +10.0.0.13 + +[PC13] +10.0.0.11 + +[PC12] +10.0.0.18 + +[PC11] +10.0.0.9 + +[PC10] +10.0.0.8 + +[PC09] +10.0.0.10 + +[PC08] +10.0.0.26 + +[PC07] +10.0.0.12 + +[PC06] +10.0.0.7 + +[PC05] +10.0.0.5 + +[PC04] +10.0.0.17 + +[PC03] +10.0.0.4 + +[PC02] +10.0.0.3 + +[PC01] +10.0.0.2 + + diff --git a/webapt/build.sbt b/webapt/build.sbt index 1100776..4d0ffa2 100644 --- a/webapt/build.sbt +++ b/webapt/build.sbt @@ -5,7 +5,7 @@ organization := "pl.brosbit" name := "webapt" -version := "0.1" +version := "0.1.1" scalaVersion := "2.10.2" diff --git a/webapt/src/main/scala/pl/brosbit/MyService.scala b/webapt/src/main/scala/pl/brosbit/MyService.scala index 55b348f..ed737c8 100644 --- a/webapt/src/main/scala/pl/brosbit/MyService.scala +++ b/webapt/src/main/scala/pl/brosbit/MyService.scala @@ -23,7 +23,7 @@ class MyServiceActor extends Actor with MyService { def receive = runRoute(myRoute) override def saveData() = dbActor ! HostData.getAllHosts.toList - override def createFile() {dbActor ! "save"} + override def createFile() {HostData.createFile} } // this trait defines our service behavior independently from the service actor