Ansible role for the installation and configuration of a Left4Dead2 dedicated server
Drop the -insecure srcds argument
host.txt and motd.txt are not in cfg/
Disable automatic testing for this role



You can also use your local clone with git send-email.

#Ansible Role: Left 4 Dead 2

An Ansible role that installs and configures a Left 4 Dead 2 dedicated server.

The game server is downloaded thought Steam and exposed as a systemd service for easier management. Using this role it is possible to publish a minimalist server.

Automatic testing is disabled for this project as it is too long and expensive.


An ansible role dedicated to the installation of SteamCMD such as ansible-steamcmd.

#Role Variables

Variable Description Default
steamcmd_user User name for steamcmd steam
steamcmd_bin Path to the steamcmd executable /usr/games/steamcmd
left4dead2_motd HTML text for the server's MOTD See below
left4dead2_server_cfg Server configuration See below
left4dead2_port Network port 27015
left4dead2_ip IP address to listen on
left4dead2_host HTTP link to a display banner none


The MOTD is a welcome text displayed by the server during the first connexion of a player. It is formatted in HTML.

Default value:

    <title>Left 4 Dead 2</title>
  <body scroll="no">


The server.cfg file is the main configuration file for the server. It holds the server name, the administrator password as well as various rules.

There is no default value.


hostname "My Left 4 Dead 2 server"
rcon_password mypassword
motd_enabled 1


The acl package should be installed on the server.

#Example Playbook

- hosts: game
    left4dead2_server_cfg: |
      hostname "My Server"
      sv_password password
      rcon_password rconpassword
    - package:
        name: acl
        state: present
    - role: ansible-steamcmd
    - role: ansible-role-left4dead2




Either send send GitHub pull requests or send patches on SourceHut.

#Author Information

Tristan Le Guern tleguern@bouledef.eu