From 392b03c0c2c6f8b0c68dc9490755f6112207ff5c Mon Sep 17 00:00:00 2001 From: vit01 Date: Wed, 2 Dec 2020 01:25:27 +0800 Subject: [PATCH] split roles --- desktop.pp | 2 + server.pp | 2 + software.pp | 47 ------------------- .../.ipynb_checkpoints/desktop-checkpoint.pp | 21 +++++++++ .../everywhere-checkpoint.pp | 18 +++++++ .../.ipynb_checkpoints/server-checkpoint.pp | 7 +++ software/manifests/desktop.pp | 21 +++++++++ software/manifests/everywhere.pp | 18 +++++++ software/manifests/server.pp | 7 +++ 9 files changed, 96 insertions(+), 47 deletions(-) create mode 100644 desktop.pp create mode 100644 server.pp delete mode 100644 software.pp create mode 100644 software/manifests/.ipynb_checkpoints/desktop-checkpoint.pp create mode 100644 software/manifests/.ipynb_checkpoints/everywhere-checkpoint.pp create mode 100644 software/manifests/.ipynb_checkpoints/server-checkpoint.pp create mode 100644 software/manifests/desktop.pp create mode 100644 software/manifests/everywhere.pp create mode 100644 software/manifests/server.pp diff --git a/desktop.pp b/desktop.pp new file mode 100644 index 0000000..5ff62ae --- /dev/null +++ b/desktop.pp @@ -0,0 +1,2 @@ +include software::everywhere +include software::desktop diff --git a/server.pp b/server.pp new file mode 100644 index 0000000..59dd999 --- /dev/null +++ b/server.pp @@ -0,0 +1,2 @@ +include software::everywhere +include software::server diff --git a/software.pp b/software.pp deleted file mode 100644 index 934559f..0000000 --- a/software.pp +++ /dev/null @@ -1,47 +0,0 @@ -class software::everywhere { - $pkgs_common = ['vim', 'git', 'curl', 'bash-completion', 'busybox', 'diffutils', 'dkms', 'elinks', 'file', 'findutils', 'gdb', 'graphicsmagick', 'grep', 'moreutils', 'ncdu', 'nmap', 'p7zip', 'parallel', 'patch', 'pciutils', 'rsync', 'screen', 'sed', 'sshfs', 'sudo', 'unzip', 'wget', 'wireguard-dkms', 'wireguard-tools'] - $pkgs_deb = ['adduser', 'apt-utils', 'apt-transport-https', 'build-essential', 'cron', 'openssh-client', 'openssh-server', 'openssh-sftp-server', 'python3-pip', 'wireguard', 'xz-utils'] - $pkgs_arch = ['base-devel', 'cronie', 'openssh', 'python-pip', 'xz'] - - $pkgs_uninst = ['mc'] - - $pkgs_custom = $operatingsystem ? { - debian => $pkgs_deb, - ubuntu => $pkgs_deb, - archlinux => $pkgs_arch, - manjarolinux => $pkgs_arch - } - - package { $pkgs_common: ensure => "installed" } - package { $pkgs_custom: ensure => "installed" } - package { $pkgs_uninst: ensure => "absent" } -} - -class software::desktop { - # fonts are questionable, gstreamer plugins, office - # camptocamp-systemd - - $pkgs_common = ['bleachbit', 'xfce4-screenshooter', 'davfs2', 'ntfs-3g', 'transmission-gtk', 'dosfstools', 'exfat-utils', 'fdisk', 'gdisk', 'gucharmap', 'gvfs', 'gvfs-fuse', 'kde-cli-tools', 'kdeconnect', 'mousepad', 'localepurge', 'modemmanager', 'mpv', 'os-prober', 'parted', 'gparted', 'pavucontrol', 'fatresize', 'pcmanfm', 'udisks2', 'usbutils', 'x2goclient', 'youtube-dl', 'zenity', 'zip'] - $pkgs_deb = ['exfat-fuse', 'firefox-esr', 'firefox-esr-l10n-ru', 'wpasupplicant', 'x11-utils', 'xinit'] - $pkgs_arch = ['exfatprogs', 'firefox', 'firefox-i18n-ru', 'archiso', 'arch-install-scripts', 'git-man', 'wpa_supplicant', 'xorg-xinit'] - - $pkgs_uninst = ['mc'] - - $pkgs_custom = $operatingsystem ? { - debian => $pkgs_deb, - ubuntu => $pkgs_deb, - archlinux => $pkgs_arch, - manjarolinux => $pkgs_arch - } - - package { $pkgs_common: ensure => "installed" } - package { $pkgs_custom: ensure => "installed" } - package { $pkgs_uninst: ensure => "absent" } -} - -class software::server { - $pkgs = ['letsencrypt', 'certbot', 'nginx', 'fail2ban'] - package { $pkgs: ensure => "installed"} -} - -include software::everywhere diff --git a/software/manifests/.ipynb_checkpoints/desktop-checkpoint.pp b/software/manifests/.ipynb_checkpoints/desktop-checkpoint.pp new file mode 100644 index 0000000..b26b0d1 --- /dev/null +++ b/software/manifests/.ipynb_checkpoints/desktop-checkpoint.pp @@ -0,0 +1,21 @@ +class software::desktop { + # fonts are questionable, gstreamer plugins, office + # camptocamp-systemd + + $pkgs_common = ['bleachbit', 'xfce4-screenshooter', 'davfs2', 'ntfs-3g', 'transmission-gtk', 'dosfstools', 'exfat-utils', 'fdisk', 'gdisk', 'gucharmap', 'gvfs', 'gvfs-fuse', 'kde-cli-tools', 'kdeconnect', 'emacs', 'mousepad', 'localepurge', 'modemmanager', 'mpv', 'os-prober', 'parted', 'gparted', 'pavucontrol', 'fatresize', 'pcmanfm', 'udisks2', 'usbutils', 'x2goclient', 'youtube-dl', 'zenity', 'zip'] + $pkgs_deb = ['exfat-fuse', 'firefox-esr', 'firefox-esr-l10n-ru', 'wpasupplicant', 'x11-utils', 'xinit'] + $pkgs_arch = ['exfatprogs', 'firefox', 'firefox-i18n-ru', 'archiso', 'arch-install-scripts', 'git-man', 'wpa_supplicant', 'xorg-xinit'] + + $pkgs_uninst = ['mc'] + + $pkgs_custom = $operatingsystem ? { + debian => $pkgs_deb, + ubuntu => $pkgs_deb, + archlinux => $pkgs_arch, + manjarolinux => $pkgs_arch + } + + package { $pkgs_common: ensure => "installed" } + package { $pkgs_custom: ensure => "installed" } + package { $pkgs_uninst: ensure => "absent" } +} \ No newline at end of file diff --git a/software/manifests/.ipynb_checkpoints/everywhere-checkpoint.pp b/software/manifests/.ipynb_checkpoints/everywhere-checkpoint.pp new file mode 100644 index 0000000..ae152e4 --- /dev/null +++ b/software/manifests/.ipynb_checkpoints/everywhere-checkpoint.pp @@ -0,0 +1,18 @@ +class software::everywhere { + $pkgs_common = ['vim', 'git', 'curl', 'bash-completion', 'busybox', 'diffutils', 'dkms', 'elinks', 'file', 'findutils', 'gdb', 'graphicsmagick', 'grep', 'moreutils', 'ncdu', 'nmap', 'p7zip', 'parallel', 'patch', 'pciutils', 'rsync', 'screen', 'sed', 'sshfs', 'sudo', 'unzip', 'wget', 'wireguard-dkms', 'wireguard-tools'] + $pkgs_deb = ['adduser', 'apt-utils', 'apt-transport-https', 'build-essential', 'cron', 'openssh-client', 'openssh-server', 'openssh-sftp-server', 'python3-pip', 'wireguard', 'xz-utils', 'apt-file'] + $pkgs_arch = ['base-devel', 'cronie', 'openssh', 'python-pip', 'xz'] + + $pkgs_uninst = [] + + $pkgs_custom = $operatingsystem ? { + debian => $pkgs_deb, + ubuntu => $pkgs_deb, + archlinux => $pkgs_arch, + manjarolinux => $pkgs_arch + } + + package { $pkgs_common: ensure => "installed" } + package { $pkgs_custom: ensure => "installed" } + package { $pkgs_uninst: ensure => "absent" } +} \ No newline at end of file diff --git a/software/manifests/.ipynb_checkpoints/server-checkpoint.pp b/software/manifests/.ipynb_checkpoints/server-checkpoint.pp new file mode 100644 index 0000000..1adfd53 --- /dev/null +++ b/software/manifests/.ipynb_checkpoints/server-checkpoint.pp @@ -0,0 +1,7 @@ +class software::server { + $pkgs = ['letsencrypt', 'certbot', 'nginx', 'fail2ban', 'emacs-nox'] + $pkgs_uninst = ['apache2-bin', 'apache2-utils'] + + package { $pkgs: ensure => "installed" } + package { $pkgs_uninst: ensure => "absent" } +} \ No newline at end of file diff --git a/software/manifests/desktop.pp b/software/manifests/desktop.pp new file mode 100644 index 0000000..b26b0d1 --- /dev/null +++ b/software/manifests/desktop.pp @@ -0,0 +1,21 @@ +class software::desktop { + # fonts are questionable, gstreamer plugins, office + # camptocamp-systemd + + $pkgs_common = ['bleachbit', 'xfce4-screenshooter', 'davfs2', 'ntfs-3g', 'transmission-gtk', 'dosfstools', 'exfat-utils', 'fdisk', 'gdisk', 'gucharmap', 'gvfs', 'gvfs-fuse', 'kde-cli-tools', 'kdeconnect', 'emacs', 'mousepad', 'localepurge', 'modemmanager', 'mpv', 'os-prober', 'parted', 'gparted', 'pavucontrol', 'fatresize', 'pcmanfm', 'udisks2', 'usbutils', 'x2goclient', 'youtube-dl', 'zenity', 'zip'] + $pkgs_deb = ['exfat-fuse', 'firefox-esr', 'firefox-esr-l10n-ru', 'wpasupplicant', 'x11-utils', 'xinit'] + $pkgs_arch = ['exfatprogs', 'firefox', 'firefox-i18n-ru', 'archiso', 'arch-install-scripts', 'git-man', 'wpa_supplicant', 'xorg-xinit'] + + $pkgs_uninst = ['mc'] + + $pkgs_custom = $operatingsystem ? { + debian => $pkgs_deb, + ubuntu => $pkgs_deb, + archlinux => $pkgs_arch, + manjarolinux => $pkgs_arch + } + + package { $pkgs_common: ensure => "installed" } + package { $pkgs_custom: ensure => "installed" } + package { $pkgs_uninst: ensure => "absent" } +} \ No newline at end of file diff --git a/software/manifests/everywhere.pp b/software/manifests/everywhere.pp new file mode 100644 index 0000000..ae152e4 --- /dev/null +++ b/software/manifests/everywhere.pp @@ -0,0 +1,18 @@ +class software::everywhere { + $pkgs_common = ['vim', 'git', 'curl', 'bash-completion', 'busybox', 'diffutils', 'dkms', 'elinks', 'file', 'findutils', 'gdb', 'graphicsmagick', 'grep', 'moreutils', 'ncdu', 'nmap', 'p7zip', 'parallel', 'patch', 'pciutils', 'rsync', 'screen', 'sed', 'sshfs', 'sudo', 'unzip', 'wget', 'wireguard-dkms', 'wireguard-tools'] + $pkgs_deb = ['adduser', 'apt-utils', 'apt-transport-https', 'build-essential', 'cron', 'openssh-client', 'openssh-server', 'openssh-sftp-server', 'python3-pip', 'wireguard', 'xz-utils', 'apt-file'] + $pkgs_arch = ['base-devel', 'cronie', 'openssh', 'python-pip', 'xz'] + + $pkgs_uninst = [] + + $pkgs_custom = $operatingsystem ? { + debian => $pkgs_deb, + ubuntu => $pkgs_deb, + archlinux => $pkgs_arch, + manjarolinux => $pkgs_arch + } + + package { $pkgs_common: ensure => "installed" } + package { $pkgs_custom: ensure => "installed" } + package { $pkgs_uninst: ensure => "absent" } +} \ No newline at end of file diff --git a/software/manifests/server.pp b/software/manifests/server.pp new file mode 100644 index 0000000..1adfd53 --- /dev/null +++ b/software/manifests/server.pp @@ -0,0 +1,7 @@ +class software::server { + $pkgs = ['letsencrypt', 'certbot', 'nginx', 'fail2ban', 'emacs-nox'] + $pkgs_uninst = ['apache2-bin', 'apache2-utils'] + + package { $pkgs: ensure => "installed" } + package { $pkgs_uninst: ensure => "absent" } +} \ No newline at end of file