Forge Home

tf2_server

A module to install, configure, and manage a Team Fortress 2 Server

10,173 downloads

9,074 latest version

3.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.2.1 (latest)
  • 0.2.0
  • 0.1.1
  • 0.1.0
released Mar 20th 2015
This version is compatible with:
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'preben-tf2_server', '0.2.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add preben-tf2_server
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install preben-tf2_server --version 0.2.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

preben/tf2_server — version 0.2.1 Mar 20th 2015

#tf2_server

####Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with tf2_server
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Known issues
  7. TODO and Hopes for the Future

##Overview

This module allows you to install, configure, and manage a dedicated server for Team Fortress 2.

##Module Description

This module lets you use the tf2_server class, which will automatically install and manage a TF2 Dedicated Server with its necessary configuration files and allow it to be managed as a service.

##Setup

###What tf2_server affects

  • Installs a TF2 Dedicated Server into a directory you specify. Note that this is a large install/download.

###Beginning with tf2_server

To start using tf2_server, simply include the tf2_server class in your manifest, and the module will do the rest.

##Reference

###Classes

  • tf2_server: This class installs, configures, and manages the tf2_server as a service.

###Parameters

The tf2_server class contains a number of parameters. These include:

  • server_install_dir: The directory in which the server should be installed. Defaults to /home/steam/hlds/.
  • server_owner: The user under whom the server should be run. Defaults to steam. Running the server as root is not recommended.
  • staging_dir: The staging directory used to download steamcmd, which is used to install the TF2 Server. Defaults to /home/steam/.
  • service_ensure: Whether or not the TF2 server service should be running. Valid values are 'running' and 'stopped'. Defaults to 'running'.
  • service_manage: Whether or not the TF2 server service should be managed by puppet. Defaults to true.
  • service_enable: Whether or not the TF2 server service should be started on boot. Defaults to true.
  • start_map: The name of the map that should run initially when the server is started. Defaults to 'ctf_2fort'. The file extension of the map file should NOT be included.
  • maplist: An array containing all the maps that should be available for use by your server. Defaults to ['ctf_2fort'].
  • mapcycle: An array containing the maps in your mapcycle in the order they appear in the mapcycle. Defaults to ['ctf_2fort'].
  • motd: Your server's message of the day.
  • hostname: The hostname of your server.
  • server_options: A hash containing any additional options you want to set in your server.cfg file. Each key in this hash should be the name of a setting, with its value being the value of the corresponding setting.

##Limitations

This module has been tested and verified on:

  • Debian 7
  • CentOS 6

The module may work on other platforms, but functionality cannot be guaranteed. As it stands currently, this module will NOT work on systems that use systemd.

Furthermore, steamcmd is a 32-bit program and uses 32-bit libraries, so, as of now, this module will only run on 32-bit architectures.

##Known Issues

  • Occasionally, the steamcmd tool may be interrupted while installing the TF2 server. In this case, the puppet run will fail, as certain necessary directories will not have been created. If this happens, simply apply your manifest again, and installation should continue from where it left off. You may need to apply your manifest multiple times to fully install the server.

##TODO and Hopes for the future

These are features I hope to implement sometime in the future.

  • Add support for 64-bit architectures.
  • Add a custom map type. This type will allow you to ensure a map is present in your map-list, and will also allow you to manage the contents of the configuration files for particular maps with puppet.