From 5e5e097ff971f3c84dd6a8f1f8ef8a042e0a561e Mon Sep 17 00:00:00 2001 From: Saibotk Date: Mon, 20 Jan 2025 00:20:02 +0100 Subject: [PATCH] remove!(factorio): unused --- playbooks/factorio.yml | 23 ------ roles/factorio/README.md | 27 ------- roles/factorio/defaults/main.yml | 37 ---------- roles/factorio/meta/main.yml | 43 ----------- roles/factorio/tasks/main.yml | 79 --------------------- roles/factorio/templates/docker-compose.yml | 40 ----------- 6 files changed, 249 deletions(-) delete mode 100644 playbooks/factorio.yml delete mode 100644 roles/factorio/README.md delete mode 100644 roles/factorio/defaults/main.yml delete mode 100644 roles/factorio/meta/main.yml delete mode 100644 roles/factorio/tasks/main.yml delete mode 100644 roles/factorio/templates/docker-compose.yml diff --git a/playbooks/factorio.yml b/playbooks/factorio.yml deleted file mode 100644 index 0a9a0db..0000000 --- a/playbooks/factorio.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# Infrastructure -# Ansible instructions to deploy the infrastructure -# Copyright (C) 2020 Saibotk -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -- name: Install & configure Factorio - hosts: factorio - roles: - - docker - - docker_cleanup - - factorio diff --git a/roles/factorio/README.md b/roles/factorio/README.md deleted file mode 100644 index df3e4cb..0000000 --- a/roles/factorio/README.md +++ /dev/null @@ -1,27 +0,0 @@ -Factorio -========= - -This will setup a [Factorio](https://github.com/factoriotools/factorio-docker) gameserver using a docker container. - -Requirements ------------- - -You will need to have docker and docker-compose installed or declared as dependencies with their respective roles. - -Role Variables --------------- - -**Please look at the [defaults/main.yml](defaults/main.yml) for all available variables and their description.** - -**Note: Lines that are commented out via `#` are usually still valid/used variables, but they are not defined by default, so they might enable a feature, when uncommenting/defining them!** - -Dependencies ------------- - -- docker -- docker-compose - -License -------- - -GPL-3.0-only diff --git a/roles/factorio/defaults/main.yml b/roles/factorio/defaults/main.yml deleted file mode 100644 index cceb46f..0000000 --- a/roles/factorio/defaults/main.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# Default variables for the factorio role - -# Infrastructure -# Ansible instructions to deploy the infrastructure -# Copyright (C) 2020 Saibotk -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# The install location (where the docker-compose file is stored) -factorio_install_location: "/srv/factorio" -factorio_data_location: "{{ factorio_install_location }}/data" - -# The camo version that should be used -# renovate: depName=docker.io/factoriotools/factorio -factorio_version: "2.0.16" - -# Docker image -factorio_image: "docker.io/factoriotools/factorio" - -# The factorio server port that should be exposed -factorio_server_port: 34197 - -# IPv6 ULA config for the bridge network used by docker-ipv6-nat -factorio_ipv6: - enabled: false - subnet: "fd9e:21a7:a92c:2456::/64" diff --git a/roles/factorio/meta/main.yml b/roles/factorio/meta/main.yml deleted file mode 100644 index 1c2ba93..0000000 --- a/roles/factorio/meta/main.yml +++ /dev/null @@ -1,43 +0,0 @@ -galaxy_info: - author: saibotk - description: "Installs a factorio server via Docker." - license: GPL-3.0-only - min_ansible_version: "2.9" - standalone: true - - platforms: - - name: EL - versions: - - all - - name: GenericUNIX - versions: - - all - - name: Fedora - versions: - - all - - name: opensuse - versions: - - all - - name: GenericBSD - versions: - - all - - name: FreeBSD - versions: - - all - - name: Ubuntu - versions: - - all - - name: SLES - versions: - - all - - name: GenericLinux - versions: - - all - - name: Debian - versions: - - all - - galaxy_tags: [] - -dependencies: - - role: docker diff --git a/roles/factorio/tasks/main.yml b/roles/factorio/tasks/main.yml deleted file mode 100644 index 59b98fb..0000000 --- a/roles/factorio/tasks/main.yml +++ /dev/null @@ -1,79 +0,0 @@ ---- -# Tasks file for the factorio role - -# Infrastructure -# Ansible instructions to deploy the infrastructure -# Copyright (C) 2020 Saibotk -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -- name: Update default SELinux contexts - community.general.sefcontext: - target: "{{ item }}(/.*)?" - setype: "container_file_t" - state: present - with_items: - - "{{ factorio_data_location }}" - tags: - - factorio - become: true - -- name: Create install directory - ansible.builtin.file: - path: "{{ item }}" - state: directory - mode: "0700" - owner: "root" - group: "root" - with_items: - - "{{ factorio_install_location }}" - become: true - tags: - - factorio - -- name: Create data directory - ansible.builtin.file: - path: "{{ item }}" - state: directory - mode: "0750" - owner: "845" - group: "845" - setype: "container_file_t" - with_items: - - "{{ factorio_data_location }}" - tags: - - factorio - become: true - -- name: Deploy docker-compose.yml - ansible.builtin.template: - src: docker-compose.yml - dest: "{{ factorio_install_location }}/docker-compose.yml" - mode: "0600" - owner: "root" - group: "root" - validate: docker compose -f %s config -q - tags: - - docker - - factorio - become: true - -- name: Compose factorio container - community.docker.docker_compose_v2: - state: present - project_src: "{{ factorio_install_location }}" - pull: always - remove_orphans: true - tags: - - factorio - become: true diff --git a/roles/factorio/templates/docker-compose.yml b/roles/factorio/templates/docker-compose.yml deleted file mode 100644 index 32de384..0000000 --- a/roles/factorio/templates/docker-compose.yml +++ /dev/null @@ -1,40 +0,0 @@ -{{ ansible_managed | comment }} - -# Infrastructure -# Ansible instructions to deploy the infrastructure -# Copyright (C) 2020 Saibotk -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, version 3 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -version: '2.1' -services: - factorio: - image: "{{ factorio_image }}:{{ factorio_version }}" - ports: - - "{{ factorio_server_port }}:34197/udp" - volumes: - - "{{ factorio_data_location }}:/factorio" - restart: always - networks: - factorio-backend: - -networks: - factorio-backend: - driver: bridge -{% if factorio_ipv6 is defined and factorio_ipv6.enabled %} - ipam: - driver: default - config: - - subnet: {{ factorio_ipv6.subnet }} - enable_ipv6: true -{% endif %}