Commit 6d851db1 authored by Ivan Tyagov's avatar Ivan Tyagov

Merge remote-tracking branch 'upstream/master'

parents e39327ab 206b4f15
......@@ -25,7 +25,7 @@ $(BUILD)/bin/buildout:
cd $(BUILD) && $(PYTHON2) -S $(CURDIR)/rebootstrap
$(BUILD)/.installed.cfg: $(BUILD)/bin/buildout $(BUILD)/buildout.cfg
cd $(BUILD) && bin/buildout
cd $(BUILD) && bin/buildout babeld-repository:recipe=
touch $@
PROGS = $(patsubst %,$(DESTDIR)/usr/bin/%,$(BIN))
......
......@@ -15,6 +15,13 @@ allow-picked-versions = true
parts += chrpath python
[babeld-repository]
git-executable =
location = ${buildout:directory}/babeld
[babeld]
post-install = make clean
[python]
recipe = zc.recipe.egg
interpreter = ${:_buildout_section_name_}.tmp
......
......@@ -52,7 +52,7 @@ BOOTSTRAP_URL = "https://bootstrap.pypa.io/bootstrap-buildout.py"
PACKAGE = "re6st-node"
BIN = "re6st-conf re6st-registry re6stnet".split()
BUILD_KEEP = "buildout.cfg", "extends-cache", "download-cache"
BUILD_KEEP = "babeld", "buildout.cfg", "download-cache", "extends-cache"
NOPART = "chrpath flex glib lunzip m4 patch perl popt site_perl xz-utils".split()
TARGET = "opt/re6st"
......@@ -178,8 +178,10 @@ def tarball(task):
t.add("re6stnet/daemon")
for x in upstream.outputs:
t.add(x)
def exclude(path):
return path.endswith('/.git')
for x in BUILD_KEEP:
t.add(BUILD + "/" + x)
t.add(BUILD + "/" + x, exclude=exclude)
@task(sdist, "debian/changelog")
def dch(task):
......
{
"variables": {
"user": "slapos",
"password": "slapos",
"disk_size": "100000",
"domain": ""
},
"builders":
[
{
"name": "debian7-testing-version",
"type": "qemu",
"format": "qcow2",
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "http://cdimage.debian.org/mirror/cdimage/archive/7.9.0/amd64/iso-cd/debian-7.9.0-amd64-netinst.iso",
"iso_checksum": "774d1fc8c5364e63b22242c33a89c1a3",
"iso_checksum_type": "md5",
"http_directory": "http",
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `password`}}",
"ssh_wait_timeout": "1800s",
"shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -h now",
"headless": true,
"boot_wait": "2s",
"boot_command": [
"<esc><wait><wait>",
"install auto ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian7.cfg ",
"debian-installer=en_US locale=en_US keymap=us ",
"netcfg/get_hostname={{ .Name }} ",
"netcfg/get_domain={{ user `domain`}} ",
"fb=false debconf/frontend=noninteractive ",
"passwd/user-fullname={{user `user`}} ",
"passwd/user-password={{user `password`}} ",
"passwd/user-password-again={{user `password`}} ",
"passwd/username={{user `user`}} ",
"<enter>"
]
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
"scripts/update.sh",
"scripts/packages.sh",
"scripts/setup-testing-version.sh",
"scripts/cleanup.sh"
]
}
]
}
{
"variables": {
"user": "slapos",
"password": "slapos",
"disk_size": "200000",
"domain": ""
},
"builders":
[
{
"name": "debian7-vm-bootstrap",
"type": "qemu",
"format": "qcow2",
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "http://cdimage.debian.org/mirror/cdimage/archive/7.11.0/amd64/iso-cd/debian-7.11.0-amd64-netinst.iso",
"iso_checksum": "096c1c18b44c269808bd815d58c53c8f",
"iso_checksum_type": "md5",
"http_directory": "http",
"ssh_username": "{{user `user`}}",
"ssh_password": "{{user `password`}}",
"ssh_wait_timeout": "1800s",
"shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -h now",
"headless": true,
"boot_wait": "2s",
"boot_command": [
"<esc><wait><wait>",
"install auto ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian7.cfg ",
"debian-installer=en_US locale=en_US keymap=fr ",
"netcfg/get_hostname={{ .Name }} ",
"netcfg/get_domain={{ user `domain`}} ",
"fb=false debconf/frontend=noninteractive ",
"passwd/user-fullname={{user `user`}} ",
"passwd/user-password={{user `password`}} ",
"passwd/user-password-again={{user `password`}} ",
"passwd/username={{user `user`}} ",
"<enter>"
]
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"scripts": [
"scripts/update.sh",
"scripts/packages.sh",
"scripts/cleanup.sh",
"scripts/vm-bootstrap.sh"
]
}
]
}
......@@ -16,8 +16,8 @@
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "http://cdimage.debian.org/debian-cd/8.3.0/amd64/iso-cd/debian-8.3.0-amd64-netinst.iso",
"iso_checksum": "a9b490b4215d1e72e876b031dafa7184",
"iso_url": "http://cdimage.debian.org/mirror/cdimage/archive/8.11.1/amd64/iso-cd/debian-8.11.1-amd64-netinst.iso",
"iso_checksum": "df0ce86d0b1d81e232ad08eef58754ed",
"iso_checksum_type": "md5",
"http_directory": "http",
......
......@@ -16,8 +16,8 @@
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "http://cdimage.debian.org/debian-cd/8.7.1/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso",
"iso_checksum": "453312bf56fc45669fec5ebc0f025ac7",
"iso_url": "http://cdimage.debian.org/mirror/cdimage/archive/8.11.1/amd64/iso-cd/debian-8.11.1-amd64-netinst.iso",
"iso_checksum": "df0ce86d0b1d81e232ad08eef58754ed",
"iso_checksum_type": "md5",
"http_directory": "http",
......
......@@ -16,8 +16,8 @@
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "http://cdimage.debian.org/debian-cd/8.7.1/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso",
"iso_checksum": "453312bf56fc45669fec5ebc0f025ac7",
"iso_url": "http://cdimage.debian.org/mirror/cdimage/archive/8.11.1/amd64/iso-cd/debian-8.11.1-amd64-netinst.iso",
"iso_checksum": "df0ce86d0b1d81e232ad08eef58754ed",
"iso_checksum_type": "md5",
"http_directory": "http",
......
......@@ -16,8 +16,8 @@
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "http://cdimage.debian.org/debian-cd/8.3.0/amd64/iso-cd/debian-8.3.0-amd64-netinst.iso",
"iso_checksum": "a9b490b4215d1e72e876b031dafa7184",
"iso_url": "http://cdimage.debian.org/mirror/cdimage/archive/8.11.1/amd64/iso-cd/debian-8.11.1-amd64-netinst.iso",
"iso_checksum": "df0ce86d0b1d81e232ad08eef58754ed",
"iso_checksum_type": "md5",
"http_directory": "http",
......
......@@ -16,8 +16,8 @@
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}",
"iso_url": "http://cdimage.debian.org/debian-cd/8.3.0/amd64/iso-cd/debian-8.3.0-amd64-netinst.iso",
"iso_checksum": "a9b490b4215d1e72e876b031dafa7184",
"iso_url": "http://cdimage.debian.org/mirror/cdimage/archive/8.11.1/amd64/iso-cd/debian-8.11.1-amd64-netinst.iso",
"iso_checksum": "df0ce86d0b1d81e232ad08eef58754ed",
"iso_checksum_type": "md5",
"http_directory": "http",
......
......@@ -18,8 +18,8 @@
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}000",
"iso_url": "http://cdimage.debian.org/debian-cd/8.6.0/amd64/iso-cd/debian-8.6.0-amd64-netinst.iso",
"iso_checksum": "e9f61bf327db6d8f7cee05a99f2353cc",
"iso_url": "http://cdimage.debian.org/mirror/cdimage/archive/8.11.1/amd64/iso-cd/debian-8.11.1-amd64-netinst.iso",
"iso_checksum": "df0ce86d0b1d81e232ad08eef58754ed",
"iso_checksum_type": "md5",
"http_directory": "http",
......
......@@ -3,23 +3,26 @@
"user": "slapos",
"password": "slapos",
"domain": "",
"disk_size": "100",
"disk_size": "6",
"name": "image",
"custom_script": "scripts/empty.sh"
"custom_script": "scripts/empty.sh",
"re6st_token": "{{env `RE6STTOKEN`}}",
"computer_token": "{{env `COMPUTERTOKEN`}}"
"computer_name": "{{env `COMPUTERNAME`}}"
},
"builders":
[
{
"name": "debian7-{{ user `disk_size`}}G-{{ user `name`}}",
"name": "debian9-rs-base-{{ user `disk_size`}}G-{{ user `name`}}",
"type": "qemu",
"format": "qcow2",
"format": "raw",
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}000",
"iso_url": "http://cdimage.debian.org/mirror/cdimage/archive/7.11.0/amd64/iso-cd/debian-7.11.0-amd64-netinst.iso",
"iso_checksum": "096c1c18b44c269808bd815d58c53c8f",
"iso_url": "https://cdimage.debian.org/mirror/cdimage/archive/9.9.0/amd64/iso-cd/debian-9.9.0-amd64-netinst.iso",
"iso_checksum": "e494e78d531352f0f3fdb210f13f7577",
"iso_checksum_type": "md5",
"http_directory": "http",
......@@ -34,7 +37,7 @@
"boot_command": [
"<esc><wait><wait>",
"install auto ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian7.cfg ",
"preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed-debian9.cfg ",
"debian-installer=en_US locale=en_US keymap=fr ",
"netcfg/get_hostname={{ .Name }} ",
"netcfg/get_domain={{ user `domain`}} ",
......@@ -55,10 +58,13 @@
{
"type": "shell",
"execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"environment_vars": ["re6st_token={{ user `re6st_token` }}", "computer_name={{user `computer_name`}}", "computer_token={{ user `computer_token` }}"],
"scripts": [
"scripts/update.sh",
"scripts/packages.sh",
"scripts/network-debian9.sh",
"scripts/cleanup.sh",
"scripts/setup-base-slapos.sh",
"{{ user `custom_script` }}"
]
}
......
......@@ -18,8 +18,8 @@
"accelerator": "kvm",
"disk_size": "{{ user `disk_size`}}000",
"iso_url": "http://cdimage.debian.org/debian-cd/9.2.1/amd64/iso-cd/debian-9.2.1-amd64-netinst.iso",
"iso_checksum": "5c583fd40360fd039b3ac98387b77dbb",
"iso_url": "https://cdimage.debian.org/mirror/cdimage/archive/9.9.0/amd64/iso-cd/debian-9.9.0-amd64-netinst.iso",
"iso_checksum": "e494e78d531352f0f3fdb210f13f7577",
"iso_checksum_type": "md5",
"http_directory": "http",
......
#!/bin/bash
# Verbose environment vars
env
#!/bin/bash
set -e
aptitude -y install --without-recommends python-setuptools
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip2 install --exists-action=i six
pip2 install --exists-action=i requests
pip2 install --exists-action=i slapcache
wget http://deploy.erp5.net/vifib-base -O /root/run-vifib-base
RE6STTOKEN=$re6st_token
COMPUTERTOKEN=$computer_token
COMPUTERNAME=$computer_name
bash /root/run-vifib-base
re6st-conf --registry http://re6stnet.gnet.erp5.cn/ --token $RE6STTOKEN -r title $RE6STTOKEN -d /etc/re6stnet
slapos node register --token $COMPUTERTOKEN --interface-name lo $COMPUTERNAME
# Re-run after the register to finish up the configuration
bash /root/run-vifib-base
wget http://deploy.erp5.cn/erp5-standalone -O /root/run-standalone
wget http://deploy.erp5.net/erp5-standalone -O /root/run-standalone
bash /root/run-standalone
sleep 10
......
......@@ -32,7 +32,7 @@ fi
export TERM=xterm
sleep 5
wget -O /root/launch-test http://deploy.erp5.cn/launch-test
wget -O /root/launch-test http://deploy.erp5.net/launch-test
chmod +x /root/launch-test
bash -lc /root/launch-test
......
wget http://deploy.erp5.cn/webrunner-standalone -O /root/run-standalone
wget http://deploy.erp5.net/webrunner-standalone -O /root/run-standalone
bash /root/run-standalone
sleep 10
......
wget http://deploy.erp5.cn/wendelin-standalone -O /root/run-standalone
wget http://deploy.erp5.net/wendelin-standalone -O /root/run-standalone
bash /root/run-standalone
sleep 10
......@@ -16,7 +16,3 @@ do
slapos node instance
sleep 5
done
wget https://lab.nexedi.com/nexedi/wendelin/raw/master/utils/wendelin-standalone-bind.sh -O /root/wendelin-standalone-bind.sh
bash /root/wendelin-standalone-bind.sh
#!/bin/bash
# This script with the values bellow only works for slapos.vifib.com.
slapos request FREEFIB-TOKEN-$1 product.re6st --type default --slave --node instance_guid=SOFTINST-76379
......@@ -3,7 +3,7 @@
connection: local
vars:
software_release_url: https://lab.node.vifib.com/nexedi/slapos/raw/1.0.56.1/software/erp5/software.cfg
software_release_url: https://lab.node.vifib.com/nexedi/slapos/raw/1.0.112/software/erp5/software.cfg
bt5_list: erp5_full_text_myisam_catalog erp5_configurator_standard
startup_playbook_id: erp5-standalone.yml
playbook_name: erp5
......
......@@ -34,7 +34,7 @@
- name: Include interface
lineinfile: dest=/etc/re6stnet/re6stnet.conf line="interface {{ lan_iface_name }}"
when: interface_name != "noname"
when: lan_iface_name != "noname"
- name: restart re6stnet service
service: name=re6stnet state=restarted enabled=yes
......
......@@ -54,6 +54,7 @@
chdir: /etc
- shell: git commit -a -m "Initial Commit"
ignore_errors: True
when: etckeeper_configuration.stat.exists == False
args:
chdir: /etc
......@@ -16,6 +16,10 @@
- include: fedora_init.yml
- name: Install Debian 10 repository key
apt_key: url={{ base_open_build_url }}/Debian_10/Release.key state=present
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "10"
- name: Install Debian 9 repository key
apt_key: url={{ base_open_build_url }}/Debian_9.0/Release.key state=present
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
......@@ -32,6 +36,10 @@
apt_key: url={{ base_open_build_url }}/Debian_6.0/Release.key state=present
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "6"
- name: Install Debian 10 repository
apt_repository: repo='deb {{ base_open_build_url }}/Debian_10/ ./' state=present
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "10"
- name: Install Debian 9 repository
apt_repository: repo='deb {{ base_open_build_url }}/Debian_9.0/ ./' state=present
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
......
......@@ -3,16 +3,31 @@
- name: Register pip installation status
command: which pip
changed_when: false
failed_when: false
ignore_errors: True
register: pip_installed
- name: Register pip3 installation status
command: which pip3
changed_when: false
ignore_errors: True
register: pip3_installed
- name: Make sure pip is installed
shell: easy_install pip
when: pip_installed|failed
when: pip_installed is failed and pip3_installed is failed
# install module with pip so that on debian 8 we can download the playbook in shacache
- name: Install/Upgrade latest slapos.libnetworkcache
- name: Install/Upgrade latest slapos.libnetworkcache using pip
shell: pip install --upgrade slapos.libnetworkcache
when: pip_installed is success
- name: Instal/Upgrade latest slapcache
- name: Install/Upgrade latest slapcache using pip
shell: pip install --upgrade slapcache
when: pip_installed is success
- name: Install/Upgrade latest slapos.libnetworkcache using pip3
shell: pip3 install --upgrade slapos.libnetworkcache
when: pip3_installed is success
- name: Install/Upgrade latest slapcache using pip3
shell: pip3 install --upgrade slapcache
when: pip3_installed is success
......@@ -66,12 +66,10 @@
chdir: /opt/upgrader/playbook-tmp/
- name: Set Cron
cron: name="Launch Upgrader with ansible" minute="0" hour="*/3" job='rm -rf /opt/upgrader/playbook && cp -R /opt/upgrader/playbook-tmp /opt/upgrader/playbook && cd /opt/upgrader/playbook && PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ansible-playbook upgrader-run.yml --extra-vars "upgrader_playbook={{ upgrader_playbook }}" -i hosts 2>>/opt/upgrader/latest_upgrade.log >> /opt/upgrader/latest_upgrade.log'
cron: name="Launch Upgrader with ansible" minute="0" hour="*/3" job='rm -rf /opt/upgrader/playbook && cp -R /opt/upgrader/playbook-tmp /opt/upgrader/playbook && cd /opt/upgrader/playbook && PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin ansible-playbook upgrader-run.yml --extra-vars "upgrader_playbook={{ upgrader_playbook }} upgrade_kernel={{ upgrade_kernel | default(False) == True }}" -i hosts 2>>/opt/upgrader/latest_upgrade.log >> /opt/upgrader/latest_upgrade.log'
- cron: name="Launch Upgrader" state=absent
- name: Upgrade Current Upgrade Signature
shell: cat /opt/upgrader/next-upgrade-signature > /opt/upgrader/current-upgrade-signature
when: (upgrade_after > lookup('file', '/opt/upgrader/last-upgrade')|int ) and (lookup('file', '/opt/upgrader/next-upgrade-signature') != lookup('file', '/opt/upgrader/current-upgrade-signature'))
......
#!/bin/bash
FILE=/opt/upgrader/REBOOT_REQUIRED
if [[ -f "$FILE" ]];
then
rm $FILE
reboot
fi
---
- name: Mark to reboot
file:
path: /opt/upgrader/REBOOT_REQUIRED
state: touch
mode: u=rw,g=r,o=r
---
- name: Install Debian stable-proposed-updates repository
apt_repository: repo='deb http://deb.debian.org/debian/ oldstable-proposed-updates main' state=present update_cache=yes
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
- name: Install kernel 4.9 on debian 9.0
apt: name=linux-image-4.9.0-5-amd64 state=latest update_cache=no
apt: name=linux-image-4.9.0-10-amd64 state=latest default_release=oldstable-proposed-updates update_cache=no
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "9"
notify: [ 'Mark to reboot' ]
- name: Install Debian jessie-backports repository
apt_repository: repo='deb http://ftp.debian.org/debian jessie-backports main' state=present update_cache=yes
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "8"
- name: Install kernel 4.9 on debian 8.0
apt: name=linux-image-4.9.0-0.bpo.5-amd64 state=latest default_release=jessie-backports update_cache=yes
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "8"
apt: name=linux-image-4.9.0-0.bpo.9-amd64 state=latest default_release=jessie-backports update_cache=yes
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "8"
notify: [ 'Mark to reboot' ]
- name: Install Debian jessie repository on debian 7
lineinfile:
......@@ -27,3 +33,15 @@
- name: Dist upgrade debian 7 to debian 8
apt: upgrade=dist update_cache=yes
when: ansible_distribution == "Debian" and ansible_distribution_major_version == "7"
notify: [ 'Mark to reboot' ]
- name: create trigger reboot script
copy: src=slapos-trigger-reboot.sh dest=/usr/local/bin/slapos-trigger-reboot.sh mode=700
- name: Stat AUTOREBOOT
stat: path=/opt/upgrader/AUTOREBOOT
register: autoreboot
- name: Setup auto-reboot cron
cron: name="Launch Reboot when REBOOT is Required" minute="*/30" job='/usr/local/bin/slapos-trigger-reboot.sh'
when: autoreboot.stat.exists == True
---
- modprobe: name=kvm_intel state=present params='nested=Y'
- name: Insert kvm_intel module with parameter nested=Y
modprobe: name=kvm_intel state=present params='nested=Y'
ignore_errors: True
- name: Prevent kvm_intel module from being loaded by udev
lineinfile:
dest: /etc/modprobe.d/blacklist.conf
line: "blacklist kvm_intel"
state: present
create: yes
- pause: seconds=2
- stat: path=/dev/kvm
register: dev_kvm
- name: Set 666 on /dev/kvm
shell: chmod 666 /dev/kvm
shell: chmod 666 /dev/kvm
when: dev_kvm.stat.exists == True
- modprobe: name=vhost-net state=present
- name: Insert vhost-net module
modprobe: name=vhost-net state=present
ignore_errors: True
- pause: seconds=2
- stat: path=/dev/vhost-net
register: dev_vhost
- name: Set 666 on /dev/vhost-net
shell: chmod 666 /dev/vhost-net
shell: chmod 666 /dev/vhost-net
when: dev_vhost.stat.exists == True
- name: Check if configuration exists already
......@@ -31,4 +40,4 @@
- name: Force create_tap to be true
shell: sed -i 's/^create_tap =.*/create_tap = True/' /etc/opt/slapos/slapos.cfg
when: xslapos_cfg.stat.exists == True
when: xslapos_cfg.stat.exists == True
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC1e2ur8La53AqozInGbJr/VIcsDwhWe6YYl8Y/WxBGj1P7f3ZjxykBtOxGkfu4IJNQK1shzSnm7qdjvSC+womI6bortipWAMkcahagyiG1RsvxsVXADFefGhfyNRyMMm2lXEk47YDr3Wojk3JCxCG5PO0Vr8khIBGh6EdHYvGYC3iktaBrbodub3jDH5y/BOmfV2SnZ97SPVP+TKmMqFhcExpuMrITyaHVXyVNgVasbIQAaZ81pe0lZWrM/QJqRnt3Fwvcn5/6D9oXAL2T5rK60UXd4rrmFEh8BRJqKrf8cvZ0CcyicgUPOYxbZYTZA8XFljdyP9PrnVv0eUWr2K78foc+gPSVzyxThaPDBWl6D1qT+pDBSAGmS5XdF2VKJkkH7Gd9Gv2jeEi71AdiTdgtIM84sJQbqnv8M3N0pY8CmjNJO4LVv13In/lKpuqSUTp90gjmSdH48m3md0dvULFxvpzI6Z0Xp4HerqGL8jAGICR+tRUBxtYtxqwkWveq7y4CWdIaAs6WhAPW4yEysnKtrfNWr1q3Mwgs8YlhWKLJ/JfmlA+EKN4o8jT9880oSBzQYV+ri/JcJamEypn+C7I3bpXcQIHf2+tCUe7SsugsLlaUHoXJyrT2X+y6gTx0U4/S7pwa9ymT3PkBI7Fcud0XpX+MYLBnWRtLUwsH10o1IQ== georgios.dagkakis@nexedi.com
\ No newline at end of file
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAsBUtIRLdGksVq4tk06ZBfXS+kMXz71apdD7GMeFDrohbd402Ej/nNj+J1/lVvuEwczBHXqy1MDIjLpS3sQ9qkjebRelmdn1G54V/A6u2slko2Tj7/Ib+UalaTbANLraNU1woVJAjAKQpFVnzZPcZMZf25aJd5TcuZ9ha7fk1STKKCiyA3Ibo2zgYM4j+SAu6/L1xxIRylbjh59M1fdtk3wTDbqLYWkPzijw8rPxwt8ws3gmmrZqcEOm1bLz0mQ+G5M26bRG3/M4qBZSYPQISBkLhVONCJP6/Yde0iRAKf8JF1DUHlY1Kgw4bMbKemoLlYix5KOoZHulNRrdbc6M+Dw== kazuhiko@nexedi.com
......@@ -8,17 +8,11 @@
- name: Add A SSH Key
authorized_key: user=root key="{{ lookup('file', 'alain_key') }}"
- name: Add N SSH Key
authorized_key: user=root key="{{ lookup('file', 'nicolas_key') }}"
- name: Add Y SSH Key
authorized_key: user=root key="{{ lookup('file', 'yusei_key') }}"
- name: Add T SSH Key
authorized_key: user=root key="{{ lookup('file', 'tatuya_key') }}"
- name: Add G SSH Key
authorized_key: user=root key="{{ lookup('file', 'guillaume_key') }}"
- name: Add GD SSH Key
authorized_key: user=root key="{{ lookup('file', 'georgios_key') }}"
- name: Add TG SSH Key
authorized_key: user=root key="{{ lookup('file', 'thomas_key') }}"
......@@ -41,6 +35,18 @@
- name: Add KW SSH Key
authorized_key: user=root key="{{ lookup('file', 'klaus_key') }}"
- name: Add KS SSH Key
authorized_key: user=root key="{{ lookup('file', 'kazuhiko_key') }}"
- name: Remove T SSH Key
authorized_key: user=root key="{{ lookup('file', 'remove_key_7') }}" state=absent
- name: Remove N SSH Key
authorized_key: user=root key="{{ lookup('file', 'remove_key_6') }}" state=absent
- name: Remove G SSH Key
authorized_key: user=root key="{{ lookup('file', 'remove_key_5') }}" state=absent
- name: Remove Hardik SSH Key
authorized_key: user=root key="{{ lookup('file', 'remove_key_4') }}" state=absent
......
......@@ -10,6 +10,7 @@ dependencies:
- { role: package, package_name: strace, package_state: latest }
- { role: package, package_name: htop, package_state: latest }
- { role: package, package_name: ioping, package_state: latest }
- { role: package, package_name: fuse, package_state: latest }
- { role: package, package_name: exim4-base, package_state: absent }
- { role: package, package_name: slapos-node, package_state: latest }
- { role: package, package_name: re6st-node, package_state: latest }
......
......@@ -41,8 +41,6 @@
- include: network.yml
- include: hostname.yml
- include: user.yml
- include: sudo.yml
when: is_playbook_ok in [False, "False"]
- include: ssh.yml
- name: Enable hotplugged CPU and Memory automatically
......
---
- name: Ensure sudo is installed
apt: name=sudo state=latest update_cache=yes cache_valid_time=86400
when: ansible_os_family == "Debian"
- include: ../../yum/tasks/main.yml name=sudo cache_valid_time=86400
when: ansible_os_family == "RedHat"
- name: Ensure /etc/sudoers.d directory is present
file: path=/etc/sudoers.d state=directory
- name: Ensure /etc/sudoers.d is scanned by sudo
action: lineinfile dest=/etc/sudoers regexp="#includedir\s+/etc/sudoers.d" line="#includedir /etc/sudoers.d"
- name: Add hadoop user to the sudoers
lineinfile: dest=/etc/sudoers.d/netadmin state=present create=yes regexp="netadmin .*" line="netadmin ALL=(root) NOPASSWD:ALL"
- name: Ensure /etc/sudoers.d/netadmin file has correct permissions
action: file path=/etc/sudoers.d/netadmin mode=0440 state=file owner=root group=root
......@@ -3,6 +3,25 @@
- name: create netadmin
user: name=netadmin shell=/bin/bash groups=root password=$6$rounds=100000$RcjiHRBJa/ORaqst$0L2hFmL5kwGpP6sY2r.hENK3DR5YLdlSDf.r57hwsLjKioYx36CdeLso.52av1UA61rhWIJWdoRYI5bFz.RAC1 update_password=on_create
- name: Ensure sudo is installed
apt: name=sudo state=latest update_cache=yes cache_valid_time=86400
when: ansible_os_family == "Debian"
- include: ../../yum/tasks/main.yml name=sudo cache_valid_time=86400
when: ansible_os_family == "RedHat"
- name: Ensure /etc/sudoers.d directory is present
file: path=/etc/sudoers.d state=directory
- name: Ensure /etc/sudoers.d is scanned by sudo
action: lineinfile dest=/etc/sudoers regexp="#includedir\s+/etc/sudoers.d" line="#includedir /etc/sudoers.d"
- name: Add netadmin user to the sudoers
lineinfile: dest=/etc/sudoers.d/netadmin state=present create=yes regexp="netadmin .*" line="netadmin ALL=(root) NOPASSWD:ALL"
- name: Ensure /etc/sudoers.d/netadmin file has correct permissions
action: file path=/etc/sudoers.d/netadmin mode=0440 state=file owner=root group=root
- name: remove other unwanted users
user: name={{ item }} state=absent
with_items:
......
......@@ -2,6 +2,6 @@
re6st_registry_url: http://slapos.tl.teralab-datascience.fr:8088/
re6st_fingerprint: sha256:19f072ec13ae08bb9b3b2a9ff6cd21811fb4fc306f9046b548ea48ec1f38ab93
slapos_master_url: https://slap.imt.vifib.com/
slapos_web_master_url: https://slapos.tl.teralab-datascience.fr/
slapos_web_master_url: https://master.slapos.teralab-datascience.fr/
interface_name: lo
re6st_annon: False
---
upgrade_after: 1559834941
upgrade_after: 1561646753
......@@ -3,7 +3,7 @@
connection: local
vars:
software_release_url: https://lab.node.vifib.com/nexedi/slapos/raw/master/software/wendelin/software.cfg
software_release_url: https://lab.node.vifib.com/nexedi/slapos/raw/1.0.112/software/wendelin/software.cfg
bt5_list: erp5_full_text_myisam_catalog erp5_configurator_standard erp5_wendelin_configurator
startup_playbook_id: wendelin-standalone.yml
request_instance_template: request-erp5.j2
......
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