GithubHelp home page GithubHelp logo

tleguern / ansible-role-sourcemod Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 22 KB

Install and configure SourceMod, the Half-Life 2 engine server modification

License: ISC License

Jinja 100.00%
ansible steam ansible-role sourcemod

ansible-role-sourcemod's Introduction

Ansible Role: sourcemod

builds.sr.ht status

An Ansible role that installs and configures SourceMod, a Metamod:Source plugin.

Automatic testing is provided using molecule's delegated driver and https://builds.sr.ht.

Requirements

An ansible role dedicated to the installation of SteamCMD such as ansible-steamcmd or any role providing the {{ steamcmd_user }} variable.

An ansible role dedicated to the installation of a Source mod such as ansible-role-cstrike-source or any role providing the Restart {{ metamod_source_game }} handler.

An ansible role dedicated to the Installation of Metamod:Source such as ansible-role-metamod-source, or any role providing the {{ metamod_source_install_path }},

Role Variables

Variable Description Default
steamcmd_user User name for steamcmd steam
sourcemod_url URL pointing to sourcemod releases https://sm.alliedmods.net/smdrop
sourcemod_branch Release branch (should generally be the same as {{ metamod_source_branch }} 1.11
metamod_source_install_path Installation directory mandatory
sourcemod_admins_simple SourceMod admin declaration via the flat file format See bellow
sourcemod_plugins List of plugins to enable or disable See bellow

sourcemod_admins_simple

A list of hashes containing the identity and flags of any server administrator. Optionnaly immunity levels and password can be suplied.

Key Description
identity A SteamID3 formatted SteamID, a bang-prefixed IP address or a simple name
flags Letter encoded permission levels
immunity Immunity level
password Password, only for somple name identity

More information here.

Example:

sourcemod_admins_simple:
  - identity: STEAM_0:1:16
    flags: bce
  - identity: "!127.0.0.1"
    immunity: "99"
    flags: z
  - identity: BAILOPAN
    flags: abc
    password: Gab3n

sourcemod_plugins

Allows to install, remove, enable or disable plugins.

Key Description
name The plugin's name without file suffix
state Only absent, disabled or enabled

If the state is either disabled or enabled and the variable sourcemod_extra_plugins_directory is not an empty string the corresponding plugin will be looked for as {{ sourcemod_extra_plugins_directory }}/{{ plugin.name }}.smx and uploaded on the remote server.

Example:

sourcemod_plugins:
  - name: funcommands
    state: disable
  - name: unwanted
    state: absent
  - name: swapteam
    state: enabled

Dependencies

None

Example Playbook

- hosts: game
  vars:
   sourcemod_admins_simple:
     - identity: STEAM_0:1:16
       flags: z
  roles:
    - role: ansible-steamcmd
    - role: ansible-role-cstrike-source
    - role: ansible-role-metamod-source
    - role: ansible-role-sourcemod

License

ISC

Contributing

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

Author Information

Tristan Le Guern [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.