Periodic tasks

Review root access

  1. Read the root access policy

  2. Update the ssh.root lists in Pillar files and the ssh.admin list in the pillar/common.sls file

  3. Deploy the affected services

Clean root user directory

  1. Run:

    ./ '*' 'ls'
  2. Leave any post.install.log files

  3. Delete any index.html* files

    • These are created when a developer runs wget commands to e.g. test proxy settings.

Check drive usage

If ncdu is installed, change to the root directory, and run the ncdu command.

Check mail

Find saved messages across servers:

./ '*' 'find /root /home/* -maxdepth 0 -name mbox'

Find mailboxes with mail across servers:

./ '*' 'find /var/mail -type f -not -size 0'

Connect to a server, and open a mailbox:

mail -f /var/mail/root

You might see a lot of repeat messages.

Here are common commands:

  • number: open that message

  • h: show a screen of messages

  • z: go to the next screen

  • d 5-10: delete the messages 5 through 10

  • d *: delete all messages

  • q: save changes and exit

  • x: exit without saving changes

In most cases, all messages can be ignored and deleted. Relevant messages might include:

Failed cron jobs

Try to correct the failure

Failed attempts to use sudo

If the attempt is not attributable to a team member, discuss security measures

Auto-remove packages

To show the packages that were automatically installed and are no longer required:

./ 'docs' pkg.autoremove list_only=True

It is generally safe to remove these. Run:

./ 'docs' pkg.autoremove purge=True

You can omit purge=True to make it easier to restore a package.

To show the packages that were removed but not purged, run:

./ '*' pkg.list_pkgs removed=True

Upgrade Ubuntu

To determine the current releases, run:

./ '*' 'lsb_release -a'

To check the long term support of the releases, consult the Ubuntu documentation.