Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F28986623
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
16 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/core/userland-software/init.sls b/roles/core/userland-software/init.sls
index 6108271..e00f626 100644
--- a/roles/core/userland-software/init.sls
+++ b/roles/core/userland-software/init.sls
@@ -1,192 +1,193 @@
# -------------------------------------------------------------
# Salt — Provision software needed by other core roles
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2016-04-09
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import dirs, packages with context %}
# -------------------------------------------------------------
# Software sources
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% if grains['os'] == 'FreeBSD' %}
/usr/local/etc/pkg/repos/Nasqueron.conf:
file.managed:
- source: salt://roles/core/userland-software/files/Nasqueron.conf
- makedirs: True
{% endif %}
{% if grains['os_family'] == 'RedHat' and grains['os'] != 'Fedora' %}
epel-release:
pkg.installed
/etc/yum.repos.d/nasqueron.repo:
file.managed:
- source: salt://roles/core/userland-software/files/nasqueron.repo
{% endif %}
{% if grains['os'] == 'Debian' %}
/etc/apt/sources.list:
file.managed:
- source: salt://roles/core/userland-software/files/sources.list
- template: jinja
- context:
debian_version: {{ grains['oscodename'] }}
apt_update_debian_sources:
cmd.run:
- name: apt update
- onchanges:
- file: /etc/apt/sources.list
{% endif %}
{% if grains['kernel'] == 'Linux' %}
snapd:
pkg.installed
{% endif %}
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Arch' %}
snap_enable:
cmd.run:
- name: |
systemctl enable --now snapd.socket
systemctl restart snapd
sleep 30
touch /var/lib/snapd/.enabled
- creates: /var/lib/snapd/.enabled
/snap:
file.symlink:
- target: /var/lib/snapd/snap
{% endif %}
{% if grains['os'] == 'FreeBSD' %}
/etc/periodic/daily/720.portsnap:
file.managed:
- source: salt://roles/core/userland-software/files/720.portsnap
{% endif %}
# -------------------------------------------------------------
# Shells
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
shells:
pkg.installed:
- pkgs:
- bash
- zsh
{% if grains['kernel'] == 'Linux' %}
- tcsh
{% endif %}
# Shell utilities
{% if grains['os'] == 'FreeBSD' %}
- starship
{% endif %}
{% if grains['kernel'] == 'Linux' and grains['osarch'] == 'x86_64' %}
install_starship:
cmd.run:
- name: snap install starship
- creates: /var/lib/snapd/snap/bin/starship
{% endif %}
/usr/local/share/zsh/site-functions/_pm:
file.managed:
# At commit 683d331 - 2017-11-05
- source: https://raw.githubusercontent.com/Angelmmiguel/pm/master/zsh/_pm
- source_hash: deea33968be713cdbd8385d3a72df2dd09c444e42499531893133f009f0ce0ea
- makedirs: True
# -------------------------------------------------------------
# tmux
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
tmux:
pkg.installed
{{ dirs.etc }}/tmux.conf:
file.managed:
- source: salt://roles/core/userland-software/files/tmux.conf
{{ dirs.bin }}/tmux-reattach:
file.managed:
- source: salt://roles/core/userland-software/files/tmux-reattach.sh
- mode: 755
# -------------------------------------------------------------
# Python
#
# The "python3" package takes care on FreeBSD to create
# the symbolic link to the relevant Python 3.x version.
#
# If Python is implicitly installed instead, it will be
# a package like python3.9 without the symlink.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
python3:
pkg.installed
# -------------------------------------------------------------
# System administration utilities
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sysadmin_utilities:
pkg.installed:
- pkgs:
- bat
+ - colordiff
- nano
- ripgrep
- tree
- wget
{% if grains['os'] == 'FreeBSD' %}
- gnu-watch
{% else %}
- {{ packages.netcat }}
- net-tools
{% endif %}
{% if grains['os_family'] == 'RedHat' %}
- psmisc
- tar
{% endif %}
{% if grains['os'] == 'Debian' %}
/usr/bin/bat:
file.symlink:
- target: /usr/bin/batcat
{% endif %}
{% if grains['os'] == 'FreeBSD' %}
/usr/local/bin/gwatch:
file.symlink:
- target: /usr/local/bin/gnu-watch
{% endif %}
{% if grains['os_family'] == 'RedHat' %}
{{ dirs.bin }}/new-partition:
file.managed:
- source: salt://roles/core/userland-software/files/new-partition.sh
- mode: 755
{% endif %}
# -------------------------------------------------------------
# Nano configuration
#
# YAML syntax highlighting is only available on newest versions:
# As checked 2023-04-19, it's not available on Debian and Rocky.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% if salt['file.file_exists'](dirs["share"] + "/nano/yaml.nanorc") %}
nano_sls_support:
file.replace:
- name: {{ dirs.share }}/nano/yaml.nanorc
- pattern: {{ 'syntax yaml "\.ya?ml$"' | regex_escape }}
- repl: syntax yaml "\.(ya?ml|sls)$"
{% endif %}
{{ dirs.etc }}/nanorc:
nano.config_autogenerated:
- nanorc_dir: {{ dirs.share }}/nano
diff --git a/roles/paas-docker/devel/software.sls b/roles/paas-docker/devel/software.sls
index fa79dcd..ba90674 100644
--- a/roles/paas-docker/devel/software.sls
+++ b/roles/paas-docker/devel/software.sls
@@ -1,44 +1,43 @@
# -------------------------------------------------------------
# Salt — Docker development tools
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2020-02-15
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import dirs, packages_prefixes with context %}
# -------------------------------------------------------------
# Dependencies not required in production but useful in dev
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
docker_development_utilities:
pkg.installed:
- pkgs:
- - colordiff
- git
- jq
- {{ packages_prefixes.python3 }}pip
- sqlite
# From Nasqueron repo
- dive
pip.installed:
- name: docker-compose
- require:
- pkg: docker_development_utilities
# -------------------------------------------------------------
# Tools
#
# :: Arcanist
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ dirs.bin }}/arc:
file.managed:
- source: salt://roles/paas-docker/devel/files/arc.sh
- mode: 755
{{ dirs.bin }}/psysh:
file.managed:
- source: salt://roles/paas-docker/devel/files/psysh.sh
- mode: 755
diff --git a/roles/salt-primary/software/init.sls b/roles/salt-primary/software/init.sls
index 9326e42..e89baa1 100644
--- a/roles/salt-primary/software/init.sls
+++ b/roles/salt-primary/software/init.sls
@@ -1,35 +1,33 @@
# -------------------------------------------------------------
# Salt — Provision a salt primary server
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2018-10-04
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import dirs, packages_prefixes with context %}
# -------------------------------------------------------------
# Additional software
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
install_salt_primary_extra_software:
pkg.installed:
- pkgs:
# Jenkins execution module
- {{ packages_prefixes.python3 }}python-jenkins
# For staging-commit-message
- {{ packages_prefixes.python3 }}gitpython
# Pillar
- {{ packages_prefixes.python3 }}salt-tower
- # Utilities
- - colordiff
{{ dirs.bin }}/staging-commit-message:
file.managed:
- source: salt://roles/salt-primary/software/files/staging-commit-message.py
- mode: 755
{{ dirs.bin }}/autochmod-git:
file.managed:
- source: salt://roles/salt-primary/software/files/autochmod-git.sh
- mode: 755
diff --git a/roles/shellserver/userland-software/base.sls b/roles/shellserver/userland-software/base.sls
index 09ae395..67fa17b 100644
--- a/roles/shellserver/userland-software/base.sls
+++ b/roles/shellserver/userland-software/base.sls
@@ -1,286 +1,285 @@
# -------------------------------------------------------------
# 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
- vim
- emacs-nox
# -------------------------------------------------------------
# General UNIX utilities
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
utilities:
pkg.installed:
- pkgs:
- cmatrix
- figlet
- glow
- {{ 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
- 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
- php7.4
- php8.0
- php8.1
{% elif grains['os'] == 'FreeBSD' %}
- php70
- php71
- php72
- php73
- php74
- php80
- php81
{% endif %}
languages:
pkg.installed:
- pkgs:
- python3
- {{ packages.tcl }}
{% if grains['os_family'] == 'Debian' %}
- php8.2
{% elif grains['os'] == 'FreeBSD' %}
- php82
{% 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 }}mbstring
- {{ packages_prefixes.php }}soap
- {{ packages_prefixes.php }}xml
- {{ packages_prefixes.php }}xsl
{% if grains['os_family'] == 'Debian' %}
- {{ packages_prefixes.php }}json
# 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 }}pgsql
- {{ packages_prefixes.php }}sqlite3
{% else %}
# On Debian, these extensions are now shipped by default:
- {{ packages_prefixes.php }}calendar
- {{ 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 }}pcntl
- {{ packages_prefixes.php }}pdo
- {{ packages_prefixes.php }}phar
- {{ packages_prefixes.php }}session
- {{ packages_prefixes.php }}simplexml
- {{ packages_prefixes.php }}sockets
- {{ 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_pgsql
- {{ packages_prefixes.php }}pdo_sqlite
{% endif %}
# PECL extensions
- {{ packages_prefixes.pecl }}yaml
# PHP utilities
- {{ packages.composer }}
{% 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.pear }}
- {{ packages.phpcs }}
{% endif %}
# Standard Python modules
{% if grains['os'] == 'FreeBSD' %}
- {{ packages_prefixes.python3 }}gdbm
- {{ packages_prefixes.python3 }}sqlite3
{% endif %}
# TCL
- tcllib
- {{ packages.tcltls }}
languages_libs_removed_files:
file.absent:
- names:
- /usr/local/etc/php/ext-20-openssl.ini
# -------------------------------------------------------------
# Workaround : install phpcs on FreeBSD
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{% if grains['os'] == 'FreeBSD' %}
/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 }}
- gifsicle
- id3v2
- {{ packages.imagemagick }}
- mozjpeg
- optipng
- sox
# -------------------------------------------------------------
# Office utilities (bureautique)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
office_software:
pkg.installed:
- pkgs:
- gcal
- pdftk
- qpdf
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, May 17, 19:16 (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3723274
Default Alt Text
(16 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment