Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
Paolo Asperti | 73a1a0ed64 | |
Paolo Asperti | 48f3dee82f | |
Paolo Asperti | 3b8eec9981 | |
Paolo Asperti | 3230e28bc6 | |
Paolo Asperti | 89758cb050 | |
Paolo Asperti | 7fadae6fe6 |
|
@ -65,6 +65,7 @@ Wakeup all machines:
|
|||
```
|
||||
|
||||
### Support for a group of machines
|
||||
|
||||
If you defined a group of machines, you can send signals to groups also.
|
||||
|
||||
```bash
|
||||
|
@ -73,6 +74,7 @@ If you defined a group of machines, you can send signals to groups also.
|
|||
```
|
||||
|
||||
## E-smith DB reference
|
||||
|
||||
The general configuration is stored in the *client-manager* key. Properties of such key are:
|
||||
|
||||
* *lastConfig*: timestamp of the actual configuration set
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Summary: LibreSchool Client Manager
|
||||
Name: libreschool-client-manager
|
||||
Version: 1.0.2
|
||||
Version: 1.0.5
|
||||
Release: 1.ns7
|
||||
License: GPL
|
||||
BuildArch: noarch
|
||||
|
@ -97,15 +97,24 @@ if [ "$1" = 0 ]; then
|
|||
fi
|
||||
|
||||
%changelog
|
||||
* Sat Mar 7 2020 Paolo Asperti <paolo@asoerti.com> - 1.0.2-1.ns7
|
||||
* Sun Apr 5 2020 Paolo Asperti <paolo@asperti.com> - 1.0.5-1.ns7
|
||||
- playbook split + added ntp
|
||||
|
||||
* Thu Apr 2 2020 Paolo Asperti <paolo@asperti.com> - 1.0.4-1.ns7
|
||||
- per-host log files
|
||||
|
||||
* Sun Mar 8 2020 Paolo Asperti <paolo@asperti.com> - 1.0.3-1.ns7
|
||||
- fix re-adoption
|
||||
|
||||
* Sat Mar 7 2020 Paolo Asperti <paolo@asperti.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
|
||||
* Sun Mar 1 2020 Paolo Asperti <paolo@asperti.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.0-1.ns7
|
||||
- First release for NethServer 7
|
||||
|
|
|
@ -5,6 +5,8 @@ remote_user = amgmt
|
|||
private_key_file=/home/amgmt/.ssh/id_rsa
|
||||
nocows = 1
|
||||
log_path = /var/log/ansible.log
|
||||
bin_ansible_callbacks = yes
|
||||
stdout_callback = log_plays
|
||||
|
||||
[privilege_escalation]
|
||||
become=True
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- name: restart systemd-timesyncd
|
||||
service: name=systemd-timesyncd state=restarted
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
|
||||
- name: Add LibreSchool signing key
|
||||
apt_key:
|
||||
url: http://repo.libreschool.org/libreschool.asc
|
||||
state: present
|
||||
|
||||
- name: Add LibreSchool repository
|
||||
apt_repository:
|
||||
repo: deb http://repo.libreschool.org/ubuntu {{ ansible_distribution_release }} main
|
||||
state: present
|
||||
|
||||
- name: Update repositories cache and install "libreschool-client" package
|
||||
apt:
|
||||
name: libreschool-client
|
||||
update_cache: yes
|
|
@ -5,22 +5,8 @@
|
|||
register: esmith
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Add LibreSchool signing key
|
||||
apt_key:
|
||||
url: http://repo.libreschool.org/libreschool.asc
|
||||
state: present
|
||||
- include: libreschool_repo.yml
|
||||
|
||||
- name: Add LibreSchool repository
|
||||
apt_repository:
|
||||
repo: deb http://repo.libreschool.org/ubuntu {{ ansible_distribution_release }} main
|
||||
state: present
|
||||
- include: required_packages.yml
|
||||
|
||||
- name: Update repositories cache and install "libreschool-client" package
|
||||
apt:
|
||||
name: libreschool-client
|
||||
update_cache: yes
|
||||
|
||||
- name: Installing common required packages
|
||||
apt:
|
||||
name: [ 'debconf', 'debconf-utils' ]
|
||||
state: latest
|
||||
- include: ntp.yml
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
|
||||
# TODO: check for other distro, maybe we should first check if we have systemd,
|
||||
# and if so, we have to properly configure it. If we don't have systemd,
|
||||
# we have to install and configure ntpd
|
||||
|
||||
- name: Remove NTP package as we use systemd
|
||||
apt:
|
||||
name: [ 'ntp' ]
|
||||
state: absent
|
||||
|
||||
- name: Setup NTP server
|
||||
ini_file:
|
||||
path: /etc/systemd/timesyncd.conf
|
||||
section: Time
|
||||
option: NTP
|
||||
value: "{{ esmith.SystemName }}.{{ esmith.DomainName }}"
|
||||
notify: restart systemd-timesyncd
|
||||
|
||||
- name: Setup Fallback NTP server
|
||||
ini_file:
|
||||
path: /etc/systemd/timesyncd.conf
|
||||
section: Time
|
||||
option: FallbackNTP
|
||||
value: pool.ntp.org
|
||||
notify: restart systemd-timesyncd
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
|
||||
- name: Installing common required packages
|
||||
apt:
|
||||
name: [ 'debconf', 'debconf-utils' ]
|
||||
state: latest
|
||||
|
|
@ -13,7 +13,6 @@
|
|||
section: server
|
||||
no_extra_spaces: yes
|
||||
value: "{{ configuration_timestamp }}"
|
||||
changed_when: no
|
||||
notify: rerun-libreschool-client
|
||||
when: lsclient_installed.rc == 0
|
||||
|
||||
# TODO: ini_file always return "changed" even if it's not
|
||||
|
|
|
@ -17,6 +17,8 @@ ping -c1 "$HOST" >/dev/null || (
|
|||
exit 1
|
||||
)
|
||||
|
||||
ssh-keygen -R "${HOST}"
|
||||
|
||||
sshpass -p "${PASS}" ssh -t -o StrictHostKeyChecking=no "${USER}@${HOST}" "whoami" || (
|
||||
echo "Can't login to $HOST as $USER"
|
||||
exit 1
|
||||
|
@ -35,7 +37,6 @@ if [[ "$AMIROOT" = "" ]]; then
|
|||
fi
|
||||
|
||||
PUB=$(db configuration getprop client-manager ManagementKeyFile)
|
||||
ssh-keygen -R "${HOST}"
|
||||
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"
|
||||
|
||||
|
|
|
@ -13,4 +13,5 @@ if [ "$USER" = "" ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
/usr/bin/sudo -u amgmt ssh-keygen -R "${1}"
|
||||
/usr/bin/sudo -u amgmt /usr/bin/ssh -o StrictHostKeyChecking=no ${USER}\@${1} ${@:2}
|
||||
|
|
Loading…
Reference in New Issue