- package: tis-basic-config
- name: Tis Base Linux
- version: 6
- categories: System and network
- maintainer: Kévin Guérineau
- locale: all
- target_os: redhat_based
- architecture: all
- signature_date:
- size: 12.01 Ko
package : tis-basic-config
version : 6
architecture : all
section : base
priority : optional
name : Tis Base Linux
categories : System and network
maintainer : Kévin Guérineau
description : Basic configuration package for Linux servers.
depends :
conflicts :
maturity : PROD
locale : all
target_os : redhat_based
min_wapt_version : 2.2
sources :
installed_size :
impacted_process :
description_fr : Paquet de configuration de base des serveurs Linux.
description_pl : Podstawowy pakiet konfiguracyjny dla serwerów Linux.
description_de : Paket für die Grundkonfiguration von Linux-Servern.
description_es : Paquete de configuración básica para servidores Linux.
description_pt : Pacote de configuração básica para servidores Linux.
description_it : Pacchetto di configurazione di base per server Linux.
description_nl : Basisconfiguratiepakket voor Linux-servers.
description_ru : Базовый пакет конфигурации для Linux-серверов.
audit_schedule :
editor :
keywords :
licence :
homepage :
package_uuid : 45d46f42-72e0-4939-bd51-dea834da44f8
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version :
max_os_version :
icon_sha256sum : 7891f1ca19ac8a9e41cb2963c0833bb3424a1dcc3f89e6ae484b1841a67063b2
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature : vuRTss7wc8Sdi1EvKgxrAAdMr8fDz0pYNhYeP8rLlM1xVoS18Ykz8YBtj4LlTd84dGiw4L766NxNvo2Fx8x5q2L6E7Ug5fv8Wm28Ib+8zRCpLyXM0/pZEjeLNtF2IhkRwmyIwjRXM1RrpI4kdzcS5YkMh7RCMGI1qeYwMKVeZf7Jdze7jKf0VRMvqPzmmP0Ne6UtBBc7+9/KYj1t1F2gavjrXTmVv2COXQAZ3Lw+Ti8NmvpfVhdWX59dDLORFhzqewocIDblCRkoHgfl28rTkRRKP1IhbON0rWqmWB5eEPVqnxzmxTknzLmk07f33xM8zlSvQHnf7KeKNooQyc0rmQ==
signature_date : 2023-08-02T18:01:26.022259
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
# -*- coding: utf-8 -*-
from setuphelpers import *
appli_list = ['vim', 'mlocate', 'openssh-server', 'rsync', 'iputils', 'traceroute', 'nmap', 'telnet', 'iftop',
'bind-utils', 'ethtool', 'iotop', 'screen', 'less', 'psmisc', 'chrony', 'tcpdump', 'tree',
'pciutils', 'usbutils', 'lsof', 'mtr', 'tmux', 'strace', 'htop', 'netcat',
'sudo', 'net-tools', 'gnupg2','redhat-lsb-core','dos2unix','curl']
use_apt_packages = False
use_swapfile = False
use_vim = False
use_old_naming = False
use_bashrc = False
pdiff = False
def install():
print('Installing %s' % control.asrequirement())
if 'tisadmin' in run('users'):
print('Please disconnect tisadmin user before install this package')
return "ERROR"
if use_apt_packages:
for appli in appli_list:
print(f'Install {appli}')
install_yum(appli)
if use_swapfile:
print('Create swapfile')
swapfile = makepath('/var','swapfile')
if not isfile(swapfile):
run(f'dd if=/dev/zero of={swapfile} bs=1M count=1024')
run(f'chmod 0600 {swapfile}')
run(f'mkswap -c {swapfile}')
run(f'swapon {swapfile}')
run(f'echo "{swapfile} none swap sw 0 0" >> /etc/fstab')
run('mount -a')
if use_vim:
print('Configure vim')
vim_version = installed_softwares('vim')[0]['version'].split(':')[1].split('-')[0]
vim_version = vim_version.split('.')[0] + vim_version.split('.')[1]
vim_path = f'/usr/share/vim/vim{vim_version}/defaults.vim'
vim_path_dir = f'/usr/share/vim/vim{vim_version}'
if not isdir(vim_path_dir):
mkdirs(vim_path_dir)
filecopyto(r'files/vimrc',makepath('/etc','vimrc'))
if isfile(vim_path):
remove_file(vim_path)
filecopyto(r'files/defaults.vim',vim_path)
if use_old_naming:
print('Use old network interface naming')
if isfile('/etc/default/grub'):
run(r"sed -i 's/#GRUB_DISABLE_LINUX_UUID=true/GRUB_DISABLE_LINUX_UUID=true/' /etc/default/grub")
run(r"sed -i 's/GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/' /etc/default/grub")
run('grub2-mkconfig -o /boot/grub2/grub.cfg')
if use_bashrc:
print('Copy .bashrc')
filecopyto(r'files/bashrc_root',r'/root/.bashrc')
filecopyto(r'files/bashrc_tisadmin',r'/home/tisadmin/.bashrc')
# -*- coding: utf-8 -*-
from setuphelpers import *
def update_package():
commit_count = params.get("commit_count",0)
control.version = commit_count
control.save_control_to_wapt()
24a94c2ddb60fe6046de564e8d5e2ea971ef681d7009cb6e2e8034653b0ffa24 : files/bashrc_root
44334fd131e1443151e9027fc0e5855874b7f30d909b64bd30a24ff479fdb302 : files/bashrc_tisadmin
850f1fb2417461327625dca46c6315c20b6982dd23da073e560eee83f1a05bc6 : files/defaults.vim
c5a969a3cd5f8b1c461a8d2fb0c4a7a22677a4c3576e6dfc429c5a5f23e178ce : files/vimrc
256184b352fcdf1bb796ad4ce62ef91d83933371ab6761a5a66b25e96ff3f4f6 : setup.py
0506431355ece6d296efc398fc457515203e9532b5caa24d3e4c3d28dd277059 : update_package.py
7891f1ca19ac8a9e41cb2963c0833bb3424a1dcc3f89e6ae484b1841a67063b2 : WAPT/icon.png
a5a97261381e1d0ad46ee15916abec9c2631d0201f5cc50ceb0197a165a0bbbf : WAPT/certificate.crt
83783e3a95bf24dd24375945710a086d483c90ec11c0c4dc6e2880791cb411ee : luti.json
019555507b68ecc571ef5226922ed2629c340327eb4277bed53e100733d42820 : WAPT/control