Commit 340c9170 authored by Nicolas Wavrant's avatar Nicolas Wavrant

playbook/re6st-upgrader: several bug fixes and improvements

 - ensure that gpg key for opensuse repo is present
 - pre-fill cache with specific node to faster bootstrap in re6stnet-upgrader
 - re6stnet-upgrader doesn't fail if previous version of package was also a re6st-node
 - repositories keys have to be installed before updating package cache
 - re6stnet-upgrader ensures that service is enabled
 - only update once package cache in re6stnet-upgrader
parent d6778722
......@@ -33,3 +33,14 @@ configure-options +=
--prefix=%(TARGET)s/parts/${:_buildout_section_name_}
environment +=
DESTDIR=%(ROOT)s
[openssl]
configure-options =
-I${zlib:location}/include
-L${zlib:location}/lib
--openssldir=${buildout:parts-directory}/${:_buildout_section_name_}/etc/ssl
--prefix=%(TARGET)s/parts/${:_buildout_section_name_}
--libdir=lib
shared no-idea no-mdc2 no-rc5 zlib
-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${buildout:parts-directory}/${:_buildout_section_name_}/lib
&& make depend
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU/Linux)
mQGiBE9rM7ARBACILnCus7kJJtRKskvLcQVl1/cIF241w1XSeK23HHn/lpKjNmQ8
C6Uaqe4RI6aBMtJq7/9pcoq165Cz+fjW5xJYRdOTCJV+8gVCeXeJ1juAxZ2cU5NB
uAJ/7rG9mu2WgtSO8s5O8Hihpmn8Z/xEnYn+Fh45lG3u9+Lkum/WMSJ+mwCg1Jw3
P2T+dffvvWrZgvfacWz0uEMD/2M+2B9XJ0Ga4Z+yVuU57CvsaHJMGnPVnwsgCu8u
KIvkawiOg/HzNgIj88yETu0Q8HhuwfbdusRfv22MGmxvqvLGDGUSkkzQ/bev2vSc
fQAerKe2+BAV3QdPWhsVh2OTLEgDn7j+qewxih2+l6ASATs++6VX3JPuISKi5XMV
1aAvA/4vyG9evJ6DlAxfd235t3LUsYSmzKa5/1Wv4bVfAQXism4oGS4vygaTFqs7
tsBitWSmp+Jo7Fc7a5QRX/yL3uyDkXBB7NLPmYitFT5OvcdKg4U0fHigWxhzl8Xs
GMQZrlokbwJ/JxLlB1xYmdotfEYCwMJYc9momYg21FvMPfFu9rRCaG9tZTpWSUZJ
Qm5leGVkaSBPQlMgUHJvamVjdCA8aG9tZTpWSUZJQm5leGVkaUBidWlsZC5vcGVu
c3VzZS5vcmc+iGYEExECACYFAlOMizICGwMFCQhAB4IGCwkIBwMCBBUCCAMEFgID
AQIeAQIXgAAKCRAutNL5lKY5h3y4AJ4qgG9vVq7jPWW+oiFlO+xW9X7YrgCgs/oW
2c0IgUcwyXKNlbSYqGyu0l2IRgQTEQIABgUCT2szsAAKCRA7MBG3a51lI7sdAJ9q
/+6D3FndEZieHpJw/kG1eZLu/ACeKk0hcqg9zrFwj21oBr96kOBXCTs=
=8ciq
-----END PGP PUBLIC KEY BLOCK-----
......@@ -6,4 +6,6 @@ CREATE TABLE peer (
CREATE TABLE config (
name TEXT PRIMARY KEY NOT NULL,
value);
INSERT INTO "peer" VALUES('0000000000000000','85.118.38.162,1194,udp;85.118.38.162,1194,tcp');
INSERT INTO "peer" VALUES('0000000000000100','188.165.197.168,1194,tcp');
COMMIT;
---
- apt_key:
data: "{{ lookup('file', 'key_1A716324.gpg') }}"
- apt_key:
data: "{{ lookup('file', 'key_2EB4D2F994A63987.gpg') }}"
- name: Install vifib package repository
apt_repository:
repo: "deb http://download.opensuse.org/repositories/home:/VIFIBnexedi/Debian_{{ ansible_distribution_major_version }}.0 ./"
state: present
update_cache: yes
- apt_key:
data: "{{ lookup('file', 'key_1A716324.gpg') }}"
- name: Purge old re6stnet package
apt: name=re6stnet state=absent purge=yes
- include: fill_cache.yml
- name: Install re6st-node package
apt: name=re6st-node update_cache=yes state=latest
apt: name=re6st-node state=latest
......@@ -9,7 +9,7 @@
- file: path=/var/lib/re6stnet owner=root group=root mode=0755 state=directory
- name: Create new cache
shell: sqlite3 /var/lib/re6stnet/cache.db < /tmp/re6st_db_create.sql && rm /tmp/re6st_db_create.sql
shell: sqlite3 /var/lib/re6stnet/cache.db < /tmp/re6st_db_create.sql && rm /tmp/re6st_db_create.sql creates=/var/lib/re6stnet/cache.db
- name: Fill new cache
command: sqlite3 -noheader -csv /var/lib/re6stnet/cache.db ".import {{ export_csv.stdout }} peer"
shell: if [ $(wc -l /var/lib/re6stnet/cache.db) -gt 0]; then sqlite3 -noheader -csv /var/lib/re6stnet/cache.db ".import {{ export_csv.stdout }} peer"; fi
......@@ -20,4 +20,7 @@
- include: rhel.yml
when: ansible_os_family == "Centos" or ansible_os_family == "RedHat"
- name: Enable re6stnet service
service: name=re6stnet enabled=yes
- command: rm {{ export_csv.stdout }}
......@@ -16,4 +16,4 @@
yum: name=re6st-node update_cache=yes state=latest
- name: Restart re6stnet service
service: name=re6stnet enabled=yes state=restarted
service: name=re6stnet state=restarted
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment