Page MenuHomeDevCentral

No OneTemporary

diff --git a/map.jinja b/map.jinja
index 16d2aa9..9328459 100644
--- a/map.jinja
+++ b/map.jinja
@@ -1,226 +1,228 @@
{% set dirs = salt['grains.filter_by']({
'Debian': {
'etc': '/etc',
'bin': '/usr/bin',
'home': '/home',
'include': '/usr/include',
'lib': '/usr/lib',
'man': '/usr/share/man',
'sbin': '/usr/sbin',
'share': '/usr/share',
},
'FreeBSD' : {
'etc': '/usr/local/etc',
'bin': '/usr/local/bin',
'home': '/usr/home',
'include': '/usr/local/include',
'lib': '/usr/local/lib',
'man': '/usr/local/man',
'sbin': '/usr/local/sbin',
'share': '/usr/local/share',
},
}, default='Debian') %}
{% set services = salt['grains.filter_by']({
'Debian': {
'manager': 'systemd',
'firewall': 'iptables',
},
'RedHat': {
'manager': 'systemd',
'firewall': 'firewalld',
},
'FreeBSD' : {
'manager': 'rc',
'firewall': 'pf',
},
}, default='Debian') %}
{% set shells = salt['grains.filter_by']({
'Debian': {
'bash': '/bin/bash',
'fish': '/usr/bin/fish',
'nologin': '/usr/sbin/nologin',
'tcsh': '/usr/bin/tcsh',
'zsh': '/bin/zsh',
},
'FreeBSD' : {
'bash': '/usr/local/bin/bash',
'fish': '/usr/local/bin/fish',
'nologin': '/sbin/nologin',
'tcsh': '/bin/tcsh',
'zsh': '/usr/local/bin/zsh',
},
'Arch': {
'bash': '/bin/bash',
'fish': '/usr/bin/fish',
'nologin': '/sbin/nologin',
'tcsh': '/usr/bin/tcsh',
'zsh': '/bin/zsh',
},
}, default='Debian') %}
{% set paths = salt['grains.filter_by']({
'FreeBSD': {
'sshd': '/usr/sbin/sshd',
'sftp': '/usr/libexec/sftp-server',
},
'Debian': {
'sshd': '/usr/sbin/sshd',
'sftp': '/usr/lib/openssh/sftp-server',
},
'RedHat': {
'sshd': '/sbin/sshd',
'sftp': '/usr/libexec/openssh/sftp-server',
},
'Arch': {
'sshd': '/usr/sbin/sshd',
'sftp': '/usr/lib/ssh/sftp-server',
},
}, default='FreeBSD') %}
{% set packages_prefixes = salt['grains.filter_by']({
'Debian': {
'pecl': 'php-',
'php': 'php7.4-',
'python2': '',
'python3': 'python3-',
'rubygem': '',
},
'RedHat': {
'pecl': 'php-pecl-',
'python2': 'python-',
'python3': 'python3-',
'rubygem': 'rubygem-',
},
'FreeBSD' : {
'pecl': 'php74-pecl-',
'php': 'php74-',
'python2': 'py27-',
'python3': 'py37-',
'rubygem': 'rubygem-',
},
}, default='Debian') %}
{% set packages = salt['grains.filter_by']({
'Debian' : {
'ag': 'silversearcher-ag',
'aspell-fr': 'aspell-fr',
'aspell-en': 'aspell-en',
+ 'bats': 'bats',
'boost': 'libboost-all-dev',
'certbot': 'certbot',
'composer': 'composer',
'cppunit': 'libcppunit-dev',
'exiftool': 'libimage-exiftool-perl',
'gpg': 'gpg',
'imagemagick': 'imagemagick',
'jpeg-turbo' : 'libjpeg-turbo',
'librabbitmq': 'librabbitmq-dev',
'lua': 'lua5.1',
'mariadb': 'mariadb-server',
'netcat': 'netcat-openbsd',
'node': 'nodejs',
'pear': 'php-pear',
'phpcs': 'php-codesniffer',
'phpunit': 'phpunit',
'postgresql': 'postgresql-13',
'sphinx': 'python3-sphinx',
'tcl': 'tcl8.6-dev',
'tcltls': 'tcl-tls',
'tdom': 'tdom',
'varnish': 'varnish',
'verbiste': 'verbiste',
'youtube-dl': 'youtube-dl',
'yubico-pam': 'libpam-yubico',
},
'RedHat': {
'ag': 'the_silver_searcher',
'aspell-fr': 'aspell-fr',
'certbot': 'python3-certbot',
'cppunit': 'cppunit-devel',
'exiftool': 'perl-Image-ExifTool',
'jpeg-turbo' : 'libjpeg-turbo',
'librabbitmq': 'librabbitmq',
'lua': 'lua',
'mariadb': 'mariadb-server',
'netcat': 'nmap-ncat',
'node': 'nodejs',
'pear': 'php-pear',
'phpcs': 'php-pear-PHP-CodeSniffer',
'sphinx': 'python3-sphinx',
'tcl': 'tcl',
'tcltls': 'tcltls',
'varnish': 'varnish',
'youtube-dl': 'youtube-dl',
'yubico-pam': 'pam_yubico',
},
'Arch': {
'ag': 'the_silver_searcher',
'aspell-fr': 'aspell-fr',
'certbot': 'certbot',
'cppunit': 'cppunit',
'mariadb': 'mariadb',
'sphinx': 'python-sphinx',
'tcltls': 'tcltls',
'varnish': 'varnish',
'youtube-dl': 'youtube-dl',
'yubico-pam': 'yubico-pam',
},
'FreeBSD' : {
'ag': 'the_silver_searcher',
'aspell-fr': 'fr-aspell',
'aspell-en': 'en-aspell',
+ 'bats': 'bats-core',
'boost': 'boost-all',
'certbot': 'py37-certbot',
'composer': 'php-composer',
'cppunit': 'cppunit',
'exiftool': 'p5-Image-ExifTool-devel',
'gpg': 'gnupg',
'imagemagick': 'ImageMagick6-nox11',
'jpeg-turbo' : 'jpeg-turbo',
'librabbitmq': 'rabbitmq-c-devel',
'lua': 'lua51',
'mariadb': 'mariadb102-server',
'node': 'node',
'pear': 'pear',
'phpcs': 'pear-PHP_CodeSniffer',
'phpunit': 'phpunit8-php74',
'postgresql': 'postgresql14-server',
'sphinx': 'py36-sphinx',
'tcl': 'tcl86',
'tcltls': 'tcltls',
'tdom': 'tDOM',
'varnish': 'varnish5',
'verbiste': 'fr-verbiste',
'youtube-dl': 'youtube_dl',
'yubico-pam': 'pam_yubico',
},
}, default='Debian') %}
{% set utilities = salt['grains.filter_by']({
'FreeBSD': {
'gmake': 'gmake',
},
'Debian': {
'gmake': 'make',
},
}, default='Debian') %}
{# -------------------------------------------------------------
Capabilities of OS and distributions
:: MOTD-printed-at-login
Login mechanism, through PAM or dotfiles,
prints the MOTD when a session is opened.
When at False, OpenSSH will take care of it.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #}
{% set capabilities = salt['grains.filter_by']({
'Debian': {
'MOTD-printed-at-login': True,
},
'FreeBSD' : {
'MOTD-printed-at-login': False,
},
}, default='Debian') %}
diff --git a/roles/shellserver/userland-software/base.sls b/roles/shellserver/userland-software/base.sls
index 111d46d..8a1b4c7 100644
--- a/roles/shellserver/userland-software/base.sls
+++ b/roles/shellserver/userland-software/base.sls
@@ -1,293 +1,294 @@
# -------------------------------------------------------------
# Salt — Provision base software
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2016-04-09
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import dirs, packages, packages_prefixes with context %}
/opt:
file.directory
# -------------------------------------------------------------
# Editors
#
# Disclaimer: We don't caution the views of Richard Stallman
# or the Church of Emacs positions.
# See http://geekfeminism.wikia.com/wiki/EMACS_virgins_joke
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
editors:
pkg.installed:
- pkgs:
- joe
- nano
- vim
- emacs-nox
# -------------------------------------------------------------
# General UNIX utilities
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
utilities:
pkg.installed:
- pkgs:
- cmatrix
- figlet
- {{ packages.gpg }}
- grc
- moreutils
- mosh
- nmap
- toilet
- unrar
- whois
- woof
- zip
{% if grains['os_family'] == 'Debian' %}
- bsdmainutils
- dnsutils
- sockstat
- sysvbanner
- toilet-fonts
{% endif %}
{% if grains['os'] == 'FreeBSD' %}
- bind-tools
- coreutils
- figlet-fonts
- gsed
- sudo
{% endif %}
utilities_www:
pkg.installed:
- pkgs:
- links
- lynx
- w3m
# -------------------------------------------------------------
# More exotic shells
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
userland_software_shells:
pkg.installed:
- pkgs:
- fish
# -------------------------------------------------------------
# Development
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dev:
pkg.installed:
- pkgs:
- {{ packages.ag }}
- autoconf
- automake
+ - {{ packages.bats }}
- cmake
- colordiff
- {{ packages.cppunit }}
- git
- git-lfs
- jq
- ripgrep
- valgrind
{% if grains['os'] == 'FreeBSD' %}
- hub
{% else %}
- arcanist
- clang
- llvm
- strace
{% endif %}
{% if grains['os_family'] == 'Debian' %}
dev_popular_libs:
pkg.installed:
- pkgs:
- libssl-dev
{% endif %}
# -------------------------------------------------------------
# Languages
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
languages_removed:
pkg.removed:
- pkgs:
{% if grains['os_family'] == 'Debian' %}
- php7.0
- php7.1
- php7.2
- php7.3
{% elif grains['os'] == 'FreeBSD' %}
- php70
- php71
- php72
- php73
{% endif %}
languages:
pkg.installed:
- pkgs:
- python3
- {{ packages.tcl }}
{% if grains['os_family'] == 'Debian' %}
- php7.4
{% elif grains['os'] == 'FreeBSD' %}
- php74
{% endif %}
# -------------------------------------------------------------
# De facto standard libraries for languages
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
languages_libs:
pkg.installed:
- pkgs:
# PHP extensions
- {{ packages_prefixes.php }}bcmath
- {{ packages_prefixes.php }}curl
- {{ packages_prefixes.php }}gd
- {{ packages_prefixes.php }}intl
- {{ packages_prefixes.php }}json
- {{ packages_prefixes.php }}mbstring
- {{ packages_prefixes.php }}soap
- {{ packages_prefixes.php }}xml
- {{ packages_prefixes.php }}xsl
{% if grains['os_family'] == 'Debian' %}
# On Debian, these PDO extensions doesn't follow regular names
# but are installed if you require the legacy extension name.
- {{ packages_prefixes.php }}mysql
- {{ packages_prefixes.php }}sqlite3
{% else %}
# On Debian, these extensions are now shipped by default:
- {{ packages_prefixes.php }}ctype
- {{ packages_prefixes.php }}dom
- {{ packages_prefixes.php }}fileinfo
- {{ packages_prefixes.php }}filter
- {{ packages_prefixes.php }}iconv
- {{ packages_prefixes.php }}mysqli
- {{ packages_prefixes.php }}openssl
- {{ packages_prefixes.php }}pcntl
- {{ packages_prefixes.php }}pdo
- {{ packages_prefixes.php }}phar
- {{ packages_prefixes.php }}session
- {{ packages_prefixes.php }}simplexml
- {{ packages_prefixes.php }}tokenizer
- {{ packages_prefixes.php }}xmlreader
- {{ packages_prefixes.php }}xmlwriter
- {{ packages_prefixes.php }}zlib
# On Debian, these PDO extensions doesn't follow regular names:
- {{ packages_prefixes.php }}pdo_mysql
- {{ packages_prefixes.php }}pdo_sqlite
{% endif %}
# PECL extensions
- {{ packages_prefixes.pecl }}yaml
# PHP utilities
{% if grains['os'] != 'FreeBSD' %}
# On FreeBSD, PEAR is still a PHP 5.6 package (last tested 2018-02-17).
# Same for Composer (last tested 2018-02-28)
- {{ packages.composer }}
- {{ packages.pear }}
- {{ packages.phpcs }}
{% endif %}
# Standard Python modules
{% if grains['os'] == 'FreeBSD' %}
- {{ packages_prefixes.python3 }}gdbm
- {{ packages_prefixes.python3 }}sqlite3
{% endif %}
# TCL
- tcllib
- {{ packages.tcltls }}
# -------------------------------------------------------------
# Workaround : install composer and phpcs on FreeBSD
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% if grains['os'] == 'FreeBSD' %}
/opt/composer:
file.directory
/opt/composer/composer.phar:
file.managed:
- source: https://github.com/composer/composer/releases/download/1.9.1/composer.phar
- source_hash: ffd3a22e43cafbeff4b3c66e334efa87a27f309da565259741f111830b6fe1217d7ab31aef47563f14e18ebeeeece46f
- mode: 755
{{ dirs.bin }}/composer:
file.symlink:
- target: /opt/composer/composer.phar
- require:
- file: /opt/composer/composer.phar
/opt/phpcs:
file.directory
{% for command in ['phpcs', 'phpcbf'] %}
/opt/phpcs/{{ command }}:
file.managed:
- source: https://squizlabs.github.io/PHP_CodeSniffer/{{ command }}.phar
- skip_verify: True
- mode: 755
{{ dirs.bin }}/{{ command }}:
file.symlink:
- target: /opt/phpcs/{{ command }}
- require:
- file: /opt/phpcs/{{ command }}
{% endfor %}
{% endif %}
# -------------------------------------------------------------
# Spelling and language utilities
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
spelling:
pkg.installed:
- pkgs:
- {{ packages['aspell-en'] }}
- {{ packages['aspell-fr'] }}
- {{ packages.verbiste }}
# -------------------------------------------------------------
# Media utilities
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
media:
pkg.installed:
- pkgs:
- {{ packages.exiftool }}
- id3v2
- {{ packages.imagemagick }}
- optipng
- sox
# -------------------------------------------------------------
# Office utilities (bureautique)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
office_software:
pkg.installed:
- pkgs:
- gcal
- pdftk
- qpdf
# -------------------------------------------------------------
# Nano configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% set nano_rc_files = salt['cmd.shell']('find ' + dirs['share'] + '/nano/ -type f') %}
{{ dirs.etc }}/nanorc:
nano.config_autogenerated:
- nanorc_dir: {{ dirs.share }}/nano

File Metadata

Mime Type
text/x-diff
Expires
Mon, Nov 25, 18:12 (11 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2258462
Default Alt Text
(14 KB)

Event Timeline