Installation of aptitude, puppet, tmux and zsh move to latecommand script (post.sh).

This commit is contained in:
Jeremy Gardais 2017-12-06 15:31:20 +01:00
parent b4f7e65a27
commit 794848eadb
15 changed files with 22 additions and 15 deletions

View File

@ -6,6 +6,7 @@
* Leave standart task in peace to be able to have a X session for user's nodes… (see #17). * Leave standart task in peace to be able to have a X session for user's nodes… (see #17).
* Update doc about Debian distribution name and remove useless entries (oldStable). * Update doc about Debian distribution name and remove useless entries (oldStable).
* No longer define zsh as default shell for root. * No longer define zsh as default shell for root.
* Installation of aptitude, puppet, tmux and zsh move to latecommand script (post.sh).
## Release 0.4.1 ## Release 0.4.1
### Improvement ### Improvement

View File

@ -127,7 +127,7 @@ Preseeding provides a way to set answers to questions asked by the Debian-Instal
* Specific to Debian Jessie and older: * Specific to Debian Jessie and older:
* Select **ssh-server** and **standard** in _tasksel_ for installation. * Select **ssh-server** and **standard** in _tasksel_ for installation.
* Add a repository for Puppet (http://apt.puppetlabs.com) and the GPG key. * Add a repository for Puppet (http://apt.puppetlabs.com) and the GPG key.
* Add additional packages: **puppet**, **tmux**, **zsh** and **tftp-hpa** (to be able to download the [latecommand archive from the PXE server][debian latecommand howto]). * Add additional packages: **tftp-hpa** (to be able to download the [latecommand archive from the PXE server][debian latecommand howto]).
------ ------

View File

@ -298,7 +298,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tmux puppet zsh tftp-hpa d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade

View File

@ -289,7 +289,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tmux puppet zsh tftp-hpa d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade

View File

@ -289,7 +289,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tmux puppet zsh tftp-hpa d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade

View File

@ -289,7 +289,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string tmux puppet zsh tftp-hpa d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade

View File

@ -291,7 +291,7 @@ tasksel tasksel/first multiselect ssh-server
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string aptitude tftp-hpa d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade

View File

@ -303,7 +303,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string aptitude tmux zsh tftp-hpa d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade

View File

@ -279,7 +279,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string aptitude tmux zsh tftp-hpa d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade

View File

@ -274,7 +274,7 @@ tasksel tasksel/first multiselect ssh-server
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string aptitude tftp-hpa d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade

View File

@ -279,7 +279,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string aptitude tmux zsh tftp-hpa d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade

View File

@ -279,7 +279,7 @@ tasksel tasksel/first multiselect ssh-server standar
## Individual additional packages to install ## Individual additional packages to install
# tftp-hpa to download an archive (see preseed/late_command at the end of this file) # tftp-hpa to download an archive (see preseed/late_command at the end of this file)
d-i pkgsel/include string aptitude tmux zsh tftp-hpa d-i pkgsel/include string tftp-hpa
# Whether to upgrade packages after debootstrap. # Whether to upgrade packages after debootstrap.
# Allowed values: none, safe-upgrade, full-upgrade # Allowed values: none, safe-upgrade, full-upgrade
d-i pkgsel/upgrade select full-upgrade d-i pkgsel/upgrade select full-upgrade

View File

@ -48,10 +48,16 @@ Some useful configurations after a Debian installation:
* Move `rsyslog` default configuration to two files (__/etc/rsyslog.conf__ and __/etc/rsyslog.d/99syslog.conf__). * Move `rsyslog` default configuration to two files (__/etc/rsyslog.conf__ and __/etc/rsyslog.d/99syslog.conf__).
* `logrotate` now rotate logs to specific directories (such as __/var/log/syslog.d__, __/var/log/mail/__,…) instead of __/var/log/__. * `logrotate` now rotate logs to specific directories (such as __/var/log/syslog.d__, __/var/log/mail/__,…) instead of __/var/log/__.
* Create these new directories. * Create these new directories.
* Remove some useless packages (nfs, tasksel,…). * Packages:
* Add minimal packages for a working system (aptitude, tmux and zsh).
* Remove some useless packages (nfs rpcbind,…).
* Ensure an openssh-server is available.
* Permit root SSH login with password (no standard user…). * Permit root SSH login with password (no standard user…).
* … * …
Specific to Debian Stretch:
* Add python-apt (Ansible dependencie).
Specific to Debian Jessie and older: Specific to Debian Jessie and older:
* Smarter rsyslog (more directories and less files in **/var/log**). * Smarter rsyslog (more directories and less files in **/var/log**).
* Shorter configuration file and use more files from /etc/rsyslog.d/ * Shorter configuration file and use more files from /etc/rsyslog.d/
@ -66,6 +72,7 @@ Specific to Debian Jessie and older:
* _localX_ logs from /var/log/localX.log to __/var/log/syslog/localX.log__ * _localX_ logs from /var/log/localX.log to __/var/log/syslog/localX.log__
* _syslog_ logs from /var/log/syslog.log to __/var/log/syslog/syslog.log__ * _syslog_ logs from /var/log/syslog.log to __/var/log/syslog/syslog.log__
* _authpriv_ logs from … to __/var/log/security/authpriv.log__ * _authpriv_ logs from … to __/var/log/security/authpriv.log__
* Add puppet package.
#### How-to use it #### How-to use it
* First, make an archive of the script and directories: * First, make an archive of the script and directories:
@ -75,8 +82,7 @@ tar czvf latecommand.tar.gz latecommand/
``` ```
* Then, it can be use at the end of a Debian preseed file: * Then, it can be use at the end of a Debian preseed file:
``` ```
d-i preseed/late_command string in-target chsh -s /bin/zsh ; \ d-i preseed/late_command string in-target /usr/bin/tftp ${IP.SRV.TFTP} -c get ${PATH/TO/TFTPD/ROOT}/scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target /usr/bin/tftp ${IP.SRV.TFTP} -c get ${PATH/TO/TFTPD/ROOT}/scripts/latecommand.tar.gz /tmp/latecommand.tar.gz ; \
in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \ in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh in-target /bin/sh /tmp/latecommand/post.sh
``` ```

Binary file not shown.

View File

@ -54,7 +54,7 @@ mkdir -p -- /var/log/journal
## Packages {{{ ## Packages {{{
# Ensure to have some basic packages # Ensure to have some basic packages
apt -y install aptitude tmux zsh apt -y install aptitude puppet tmux zsh
# Remove NFS and rpcbind # Remove NFS and rpcbind
aptitude -y remove nfs-common rpcbind aptitude -y remove nfs-common rpcbind