Compare commits
4 Commits
31d6f096cf
...
294295fd41
Author | SHA1 | Date | |
---|---|---|---|
294295fd41 | |||
773c4c8dd4 | |||
debd737d85 | |||
20f51f3aba |
45
README.md
45
README.md
@ -5,37 +5,80 @@ This software uses Ansible Playbooks to configure all connected clients.
|
|||||||
## Available Events
|
## Available Events
|
||||||
|
|
||||||
Adopt a machine (which should already exist in the *hosts* db):
|
Adopt a machine (which should already exist in the *hosts* db):
|
||||||
|
|
||||||
|
```bash
|
||||||
# signal-event client-adopt pc-99 username password
|
# signal-event client-adopt pc-99 username password
|
||||||
|
```
|
||||||
|
|
||||||
Reboot a machine:
|
Reboot a machine:
|
||||||
|
|
||||||
|
```bash
|
||||||
# signal-event client-reboot pc-01
|
# signal-event client-reboot pc-01
|
||||||
|
```
|
||||||
|
|
||||||
Reboot all machines:
|
Reboot all machines:
|
||||||
|
|
||||||
|
```bash
|
||||||
# signal-event client-reboot-all
|
# signal-event client-reboot-all
|
||||||
|
```
|
||||||
|
|
||||||
Force reconfiguration of a machine:
|
Force reconfiguration of a machine:
|
||||||
|
|
||||||
|
```bash
|
||||||
# signal-event client-reconfigure pc-02
|
# signal-event client-reconfigure pc-02
|
||||||
|
```
|
||||||
|
|
||||||
Force reconfiguration of all machines:
|
Force reconfiguration of all machines:
|
||||||
|
|
||||||
|
```bash
|
||||||
# signal-event client-reconfigure-all
|
# signal-event client-reconfigure-all
|
||||||
|
```
|
||||||
|
|
||||||
Shutdown a machine:
|
Shutdown a machine:
|
||||||
|
|
||||||
|
```bash
|
||||||
# signal-event client-shutdown pc-02
|
# signal-event client-shutdown pc-02
|
||||||
|
```
|
||||||
|
|
||||||
Shutdown all machines:
|
Shutdown all machines:
|
||||||
|
|
||||||
|
```bash
|
||||||
# signal-event client-shutdown-all
|
# signal-event client-shutdown-all
|
||||||
|
```
|
||||||
|
|
||||||
Update source configuration timestamp:
|
Update source configuration timestamp:
|
||||||
|
|
||||||
|
```bash
|
||||||
# signal-event client-update-lastconfig
|
# signal-event client-update-lastconfig
|
||||||
|
```
|
||||||
|
|
||||||
Wakeup a machine:
|
Wakeup a machine:
|
||||||
|
|
||||||
|
```bash
|
||||||
# signal-event client-wake pc-02
|
# signal-event client-wake pc-02
|
||||||
|
```
|
||||||
|
|
||||||
Wakeup all machines:
|
Wakeup all machines:
|
||||||
|
|
||||||
|
```bash
|
||||||
# signal-event client-wake-all
|
# signal-event client-wake-all
|
||||||
|
```
|
||||||
|
|
||||||
### Support for a group of machines
|
### Support for a group of machines
|
||||||
If you defined a group of machines, you can send signals to groups also.
|
If you defined a group of machines, you can send signals to groups also.
|
||||||
|
|
||||||
|
```bash
|
||||||
# db hosts set epoptes_lab1 group members 'pc-01 pc-02 pc-03' master pc-01
|
# db hosts set epoptes_lab1 group members 'pc-01 pc-02 pc-03' master pc-01
|
||||||
# signal-event client-wake epoptes_lab1
|
# signal-event client-wake epoptes_lab1
|
||||||
|
```
|
||||||
|
|
||||||
## E-smith DB reference
|
## E-smith DB reference
|
||||||
The general configuration is stored in the *client-manager* key. Properties of such key are:
|
The general configuration is stored in the *client-manager* key. Properties of such key are:
|
||||||
|
|
||||||
* *lastConfig*: timestamp of the actual configuration set
|
* *lastConfig*: timestamp of the actual configuration set
|
||||||
* *ManagementKeyFile*: management user's SSH public key
|
* *ManagementKeyFile*: management user's SSH public key
|
||||||
* *ManagementPrivateKeyFile*: management user's SSH private key
|
* *ManagementPrivateKeyFile*: management user's SSH private key
|
||||||
|
|
||||||
|
|
||||||
All host-specific information are stored in the *hosts* db. For each host we have:
|
All host-specific information are stored in the *hosts* db. For each host we have:
|
||||||
|
|
||||||
* *sshUser*: ssh user used to connect to the host. This is set when SSH adoption is successful
|
* *sshUser*: ssh user used to connect to the host. This is set when SSH adoption is successful
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Summary: LibreSchool Client Manager
|
Summary: LibreSchool Client Manager
|
||||||
Name: libreschool-client-manager
|
Name: libreschool-client-manager
|
||||||
Version: 1.0.1
|
Version: 1.0.2
|
||||||
Release: 1.ns7
|
Release: 1.ns7
|
||||||
License: GPL
|
License: GPL
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -97,5 +97,15 @@ if [ "$1" = 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Mar 7 2020 Paolo Asperti <paolo@asoerti.com> - 1.0.2-1.ns7
|
||||||
|
- fix re-adoption
|
||||||
|
- added some required packages
|
||||||
|
- updated readme
|
||||||
|
|
||||||
|
* Sun Mar 1 2020 Paolo Asperti <paolo@asoerti.com> - 1.0.1-1.ns7
|
||||||
|
- added client shell
|
||||||
|
- fixed amgmt user creation
|
||||||
|
- fix creation of httpd config
|
||||||
|
|
||||||
* Sun Apr 28 2019 Paolo Asperti <paolo@asperti.com> - 1.0-1.ns7
|
* Sun Apr 28 2019 Paolo Asperti <paolo@asperti.com> - 1.0-1.ns7
|
||||||
- First release for NethServer 7
|
- First release for NethServer 7
|
||||||
|
@ -19,3 +19,8 @@
|
|||||||
apt:
|
apt:
|
||||||
name: libreschool-client
|
name: libreschool-client
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Installing common required packages
|
||||||
|
apt:
|
||||||
|
name: [ 'debconf', 'debconf-utils' ]
|
||||||
|
state: latest
|
||||||
|
@ -35,6 +35,7 @@ if [[ "$AMIROOT" = "" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
PUB=$(db configuration getprop client-manager ManagementKeyFile)
|
PUB=$(db configuration getprop client-manager ManagementKeyFile)
|
||||||
|
ssh-keygen -R "${HOST}"
|
||||||
cat $PUB | \
|
cat $PUB | \
|
||||||
sshpass -p "${PASS}" ssh -t -o StrictHostKeyChecking=no "${USER}@${HOST}" "echo '${PASS}' | sudo -S mkdir /root/.ssh >/dev/null ; sudo tee -a /root/.ssh/authorized_keys"
|
sshpass -p "${PASS}" ssh -t -o StrictHostKeyChecking=no "${USER}@${HOST}" "echo '${PASS}' | sudo -S mkdir /root/.ssh >/dev/null ; sudo tee -a /root/.ssh/authorized_keys"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user