From d0b51b70f4be0807655c9f947c7c07cc0f275a06 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 13 Aug 2018 12:27:41 -0700 Subject: [PATCH] puppet-lint: Enforce 2sp_soft_tables puppet-lint check. This cleans up the puppet codebase's whitespace formatting to be more consistent. --- puppet/zulip/manifests/app_frontend_base.pp | 3 +- puppet/zulip/manifests/postgres_common.pp | 6 +- puppet/zulip_ops/manifests/app_frontend.pp | 4 +- puppet/zulip_ops/manifests/base.pp | 68 +++++++++---------- puppet/zulip_ops/manifests/munin.pp | 10 +-- puppet/zulip_ops/manifests/nagios.pp | 10 +-- puppet/zulip_ops/manifests/postgres_common.pp | 27 ++++---- puppet/zulip_ops/manifests/zmirror.pp | 28 ++++---- .../zulip_ops/manifests/zmirror_personals.pp | 28 ++++---- tools/linter_lib/exclude.py | 1 - 10 files changed, 94 insertions(+), 91 deletions(-) diff --git a/puppet/zulip/manifests/app_frontend_base.pp b/puppet/zulip/manifests/app_frontend_base.pp index afa6e33a5e..3247999f75 100644 --- a/puppet/zulip/manifests/app_frontend_base.pp +++ b/puppet/zulip/manifests/app_frontend_base.pp @@ -77,8 +77,7 @@ class zulip::app_frontend_base { notify => Service['supervisor'], } - $uwsgi_processes = zulipconf('application_server', 'uwsgi_processes', - $uwsgi_default_processes) + $uwsgi_processes = zulipconf('application_server', 'uwsgi_processes', $uwsgi_default_processes) file { '/etc/zulip/uwsgi.ini': ensure => file, require => Package[supervisor], diff --git a/puppet/zulip/manifests/postgres_common.pp b/puppet/zulip/manifests/postgres_common.pp index b737447f9f..8d41620dcd 100644 --- a/puppet/zulip/manifests/postgres_common.pp +++ b/puppet/zulip/manifests/postgres_common.pp @@ -55,8 +55,10 @@ class zulip::postgres_common { @user { 'postgres': groups => ['ssl-cert'], membership => minimum, - require => [Package["postgresql-${zulip::base::postgres_version}"], - Package['ssl-cert']], + require => [ + Package["postgresql-${zulip::base::postgres_version}"], + Package['ssl-cert'] + ], } User <| title == postgres |> { groups +> 'zulip' } } diff --git a/puppet/zulip_ops/manifests/app_frontend.pp b/puppet/zulip_ops/manifests/app_frontend.pp index 17e8ad6d5e..0df555ec51 100644 --- a/puppet/zulip_ops/manifests/app_frontend.pp +++ b/puppet/zulip_ops/manifests/app_frontend.pp @@ -5,8 +5,8 @@ class zulip_ops::app_frontend { include zulip::postfix_localmail include zulip::static_asset_compiler $app_packages = [# Needed for the ssh tunnel to the redis server - "autossh", - ] + "autossh", + ] package { $app_packages: ensure => "installed" } $hosts_domain = zulipconf("nagios", "hosts_domain", undef) diff --git a/puppet/zulip_ops/manifests/base.pp b/puppet/zulip_ops/manifests/base.pp index a1f54fd262..8567657fff 100644 --- a/puppet/zulip_ops/manifests/base.pp +++ b/puppet/zulip_ops/manifests/base.pp @@ -3,40 +3,40 @@ class zulip_ops::base { include zulip::apt_repository $org_base_packages = [# Management for our systems - "openssh-server", - "mosh", - # package management - "aptitude", - # SSL Certificates - "letsencrypt", - # Monitoring - "munin-node", - "munin-plugins-extra" , - # Security - "iptables-persistent", - # For managing our current Debian packages - "debian-goodies", - # Needed for zulip-ec2-configure-network-interfaces - 'dhcpcd5', - "python3-six", - "python-six", - # "python3-boto", # missing on trusty - "python-boto", # needed for postgres_common too - "python3-netifaces", - "python-netifaces", - # Popular editors - "vim", - "emacs-nox", - "puppet-el", - # Prevent accidental reboots - "molly-guard", - # Useful tools in a production environment - "screen", - "strace", - "host", - "git", - "nagios-plugins-contrib", - ] + "openssh-server", + "mosh", + # package management + "aptitude", + # SSL Certificates + "letsencrypt", + # Monitoring + "munin-node", + "munin-plugins-extra" , + # Security + "iptables-persistent", + # For managing our current Debian packages + "debian-goodies", + # Needed for zulip-ec2-configure-network-interfaces + 'dhcpcd5', + "python3-six", + "python-six", + # "python3-boto", # missing on trusty + "python-boto", # needed for postgres_common too + "python3-netifaces", + "python-netifaces", + # Popular editors + "vim", + "emacs-nox", + "puppet-el", + # Prevent accidental reboots + "molly-guard", + # Useful tools in a production environment + "screen", + "strace", + "host", + "git", + "nagios-plugins-contrib", + ] package { $org_base_packages: ensure => "installed" } # Add system users here diff --git a/puppet/zulip_ops/manifests/munin.pp b/puppet/zulip_ops/manifests/munin.pp index a63a2d2210..5dee6fa4ce 100644 --- a/puppet/zulip_ops/manifests/munin.pp +++ b/puppet/zulip_ops/manifests/munin.pp @@ -2,11 +2,11 @@ class zulip_ops::munin { include zulip::supervisor $munin_packages = [# Packages needed for munin - "munin", - "autossh", - # Packages needed for munin website - 'libapache2-mod-fcgid', - ] + "munin", + "autossh", + # Packages needed for munin website + 'libapache2-mod-fcgid', + ] package { $munin_packages: ensure => "installed" } $hosts_domain = zulipconf("nagios", "hosts_domain", undef) diff --git a/puppet/zulip_ops/manifests/nagios.pp b/puppet/zulip_ops/manifests/nagios.pp index 84a33cf40e..d252ffec36 100644 --- a/puppet/zulip_ops/manifests/nagios.pp +++ b/puppet/zulip_ops/manifests/nagios.pp @@ -88,11 +88,11 @@ class zulip_ops::nagios { } file { [ '/etc/nagios3/conf.d/extinfo_nagios2.cfg', - '/etc/nagios3/conf.d/services_nagios2.cfg', - '/etc/nagios3/conf.d/contacts_nagios2.cfg', - '/etc/nagios3/conf.d/hostgroups_nagios2.cfg', - '/etc/nagios3/conf.d/localhost_nagios2.cfg', - ]: + '/etc/nagios3/conf.d/services_nagios2.cfg', + '/etc/nagios3/conf.d/contacts_nagios2.cfg', + '/etc/nagios3/conf.d/hostgroups_nagios2.cfg', + '/etc/nagios3/conf.d/localhost_nagios2.cfg', + ]: ensure => absent, } diff --git a/puppet/zulip_ops/manifests/postgres_common.pp b/puppet/zulip_ops/manifests/postgres_common.pp index 18d1d134cd..509d2ca74e 100644 --- a/puppet/zulip_ops/manifests/postgres_common.pp +++ b/puppet/zulip_ops/manifests/postgres_common.pp @@ -2,13 +2,13 @@ class zulip_ops::postgres_common { include zulip::postgres_common $internal_postgres_packages = [# dependencies for our wal-e backup system - "lzop", - "pv", - "python3-pip", - "python-pip", - # "python3-gevent", # missing on trusty - "python-gevent", - ] + "lzop", + "pv", + "python3-pip", + "python-pip", + # "python3-gevent", # missing on trusty + "python-gevent", + ] package { $internal_postgres_packages: ensure => "installed" } exec {"pip_wal-e": @@ -28,11 +28,14 @@ class zulip_ops::postgres_common { minute => 0, target => "postgres", user => "postgres", - require => [ File["/usr/local/bin/pg_backup_and_purge"], - Package["postgresql-${zulip::base::postgres_version}", - "python3-dateutil", - "python-dateutil" - ] ] + require => [ + File["/usr/local/bin/pg_backup_and_purge"], + Package[ + "postgresql-${zulip::base::postgres_version}", + "python3-dateutil", + "python-dateutil" + ] + ] } exec { "sysctl_p": diff --git a/puppet/zulip_ops/manifests/zmirror.pp b/puppet/zulip_ops/manifests/zmirror.pp index ebd9333f9d..9302c8f55f 100644 --- a/puppet/zulip_ops/manifests/zmirror.pp +++ b/puppet/zulip_ops/manifests/zmirror.pp @@ -3,20 +3,20 @@ class zulip_ops::zmirror { include zulip::supervisor $zmirror_packages = [# Packages needed to run the mirror - "libzephyr4-krb5", - "zephyr-clients", - "krb5-config", - "krb5-user", - "debathena-kerberos-config", - "debathena-zephyr-config", - # Packages needed to build pyzephyr - "libzephyr-dev", - "comerr-dev", - "python3-dev", - "python-dev", - "cython3", - "cython", - ] + "libzephyr4-krb5", + "zephyr-clients", + "krb5-config", + "krb5-user", + "debathena-kerberos-config", + "debathena-zephyr-config", + # Packages needed to build pyzephyr + "libzephyr-dev", + "comerr-dev", + "python3-dev", + "python-dev", + "cython3", + "cython", + ] package { $zmirror_packages: ensure => "installed" } apt::source {'debathena': diff --git a/puppet/zulip_ops/manifests/zmirror_personals.pp b/puppet/zulip_ops/manifests/zmirror_personals.pp index abe7c373f3..4405000535 100644 --- a/puppet/zulip_ops/manifests/zmirror_personals.pp +++ b/puppet/zulip_ops/manifests/zmirror_personals.pp @@ -3,20 +3,20 @@ class zulip_ops::zmirror_personals { include zulip::supervisor $zmirror_packages = [# Packages needed to run the mirror - "libzephyr4-krb5", - "zephyr-clients", - "krb5-config", - "krb5-user", - "debathena-kerberos-config", - "debathena-zephyr-config", - # Packages needed to build pyzephyr - "libzephyr-dev", - "comerr-dev", - "python3-dev", - "python-dev", - "cython3", - "cython", - ] + "libzephyr4-krb5", + "zephyr-clients", + "krb5-config", + "krb5-user", + "debathena-kerberos-config", + "debathena-zephyr-config", + # Packages needed to build pyzephyr + "libzephyr-dev", + "comerr-dev", + "python3-dev", + "python-dev", + "cython3", + "cython", + ] package { $zmirror_packages: ensure => "installed" } apt::source {'debathena': diff --git a/tools/linter_lib/exclude.py b/tools/linter_lib/exclude.py index 5de662bb27..a15738c5bf 100644 --- a/tools/linter_lib/exclude.py +++ b/tools/linter_lib/exclude.py @@ -16,7 +16,6 @@ EXCLUDED_FILES = [ PUPPET_CHECK_RULES_TO_EXCLUDE = [ "--no-double_quoted_strings-check", - "--no-2sp_soft_tabs-check", "--no-documentation-check", "--no-80chars-check", ]