{"id":16780105,"url":"https://github.com/voidquark/privatebin","last_synced_at":"2026-03-03T18:01:35.691Z","repository":{"id":192375423,"uuid":"686601223","full_name":"voidquark/privatebin","owner":"voidquark","description":"Ansible Role - PrivateBin","archived":false,"fork":false,"pushed_at":"2024-08-14T13:26:20.000Z","size":33,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T16:53:36.513Z","etag":null,"topics":["ansible","ansible-galaxy","ansible-playbook","ansible-role","podman","podman-systemd","privatebin","redhat","rhel","rootless-container"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/ui/standalone/roles/voidquark/privatebin/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voidquark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-03T10:49:54.000Z","updated_at":"2024-11-20T08:57:30.000Z","dependencies_parsed_at":"2024-05-09T20:31:27.782Z","dependency_job_id":"48950a68-216d-478c-be33-7fb2cc011bb5","html_url":"https://github.com/voidquark/privatebin","commit_stats":null,"previous_names":["voidquark/privatebin"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/voidquark/privatebin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidquark%2Fprivatebin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidquark%2Fprivatebin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidquark%2Fprivatebin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidquark%2Fprivatebin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voidquark","download_url":"https://codeload.github.com/voidquark/privatebin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidquark%2Fprivatebin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30053986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T17:46:22.538Z","status":"ssl_error","status_checked_at":"2026-03-03T17:46:22.036Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-galaxy","ansible-playbook","ansible-role","podman","podman-systemd","privatebin","redhat","rhel","rootless-container"],"created_at":"2024-10-13T07:34:02.947Z","updated_at":"2026-03-03T18:01:35.647Z","avatar_url":"https://github.com/voidquark.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# PrivateBin - Ansible Role\n\n[![License](https://img.shields.io/github/license/voidquark/privatebin)](LICENSE)\n\nThe Ansible PrivateBin Role empowers you to effortlessly deploy and manage a secure [PrivateBin](https://github.com/PrivateBin/PrivateBin) service using a rootless Podman container.\n\n**🔑 Key Features**\n- **🛡️ Root-less deployment**: PrivateBin is securely containerized and operates in a root-less mode within a user namespace. The container is managed through a systemd unit.\n- **🔄 Idempotent deployment**: Role embraces idempotent deployment, ensuring that the state of your deployment always matches your desired inventory.\n- **📦 Out-of-the-box Deployment**: Get Privatebin up and running quickly with default configurations that work seamlessly with Red Hat family systems. See [Quick Start](#quick-start) for easy setup.\n- **🧩 Flexible Configuration**: Easily customize Privatebin configuration to match your specific requirements.\n\n📢 **[Check the blog post](https://voidquark.com/blog/privatebin-deployment-with-rootless-podman-using-ansible-role/)** 📝 **Understand the rationale behind constructing this role in a specific manner.**\n\n## Table of Content\n\n- [Requirements](#requirements)\n- [Role Variables](#role-variables)\n- [Playbook](#playbook)\n- [Quick Start](#quick-start)\n\n## Requirements\n\n- Ansible 2.10+\n- Tested on `RHEL`/`RockyLinux` 9, but should work with compatible distributions.\n- If the following Ansible collections are not already available in your environment, please install them: `ansible-galaxy collection install ansible.posix` and `ansible-galaxy collection install containers.podman`.\n- Ensure that the `podman` and `loginctl` binaries are present on the target system.\n\n## Role Variables\n\n```yaml\nprivatebin_user: \"privatebin\"\n```\nOS user under which the PrivateBin container runs.\n\n```yaml\nprivatebin_group: \"privatebin\"\n```\nOS group for the PrivateBin user.\n\n```yaml\nprivatebin_dir: \"/home/{{ privatebin_user }}/privatebin\"\n```\nDefault PrivateBin directory where all templates and configuration files are stored by Ansible.\n\n```yaml\nprivatebin_data_dir: \"{{ privatebin_dir }}/data\"\n```\nDefault PrivateBin data directory.\n\n```yaml\nprivatebin_container_name: \"privatebin\"\n```\nDefault name of the PrivateBin container.\n\n```yaml\nprivatebin_container_image: \"docker.io/privatebin/nginx-fpm-alpine:stable\"\n```\nDefault container image.\n\n```yaml\nprivatebin_container_volumes:\n  - \"{{ privatebin_data_dir }}:/srv/data:rw,Z\"\n  - \"{{ privatebin_dir }}/conf.php:/srv/cfg/conf.php:ro,Z\"\n```\nBy default, only the data directory and PrivateBin configuration file are mounted as container volumes. If you need to modify the `php.ini` or `nginx` configuration, you will need to append additional volumes.\n\n```yaml\nprivatebin_container_publish: \"8080:8080\"\n```\nDefault container port configuration is set to `8080` for both the host and container.\n\n```yaml\nprivatebin_conf_raw: |\n  ;\u003c?php http_response_code(403); /*\n  ; config file for PrivateBin\n  ;\n  ; An explanation of each setting can be find online at https://github.com/PrivateBin/PrivateBin/wiki/Configuration.\n\n  [main]\n  discussion = true\n  opendiscussion = false\n  password = true\n  fileupload = false\n  burnafterreadingselected = false\n  defaultformatter = \"plaintext\"\n  sizelimit = 10485760\n  template = \"bootstrap5\"\n  languageselection = false\n\n  [expire]\n  default = \"1week\"\n\n  [expire_options]\n  5min = 300\n  10min = 600\n  1hour = 3600\n  1day = 86400\n  1week = 604800\n  1month = 2592000\n  1year = 31536000\n  never = 0\n\n  [formatter_options]\n  plaintext = \"Plain Text\"\n  syntaxhighlighting = \"Source Code\"\n  markdown = \"Markdown\"\n\n  [traffic]\n  limit = 10\n\n  [purge]\n  limit = 300\n  batchsize = 10\n\n  [model]\n  class = Filesystem\n  [model_options]\n  dir = PATH \"data\"\n\n  [yourls]\n```\nThe default PrivateBin PHP configuration. You can customize this as needed. For detailed configuration options, refer to the [PrivateBin documentation](https://github.com/PrivateBin/PrivateBin/wiki/Configuration).\n\n### Variables not set by default\n\n```yaml\nprivatebin_firewalld_expose_port: 8080\n```\nThis variable specifies the TCP port for exposing Privatebin via Firewalld. By default, it is not exposed.\n\n```yaml\nprivatebin_custom_conf:\n  - filename: \"php.ini\"\n    raw_content: |\n      EXAMPLE\n  - filename: \"site.conf\"\n    raw_content: |\n      EXAMPLE\n```\nYou can template multiple custom configuration files, such as `php.ini` or any `nginx` config. These files are templated in the `privatebin_dir`, and the file name is specified using the `filename` attribute. Please note you must update the `privatebin_container_volumes` variable to include your custom configs, which need to be mounted inside the container.\n\n\n## Dependencies\n\nNo Dependencies\n\n## Playbook\n\n- Example playbook to deploy privatebin\n```yaml\n- name: Manage Privatebin service\n  hosts: privatebin\n  gather_facts: false\n  become: true\n  roles:\n    - role: voidquark.privatebin\n```\n\n## Quick Start\n\nTo quickly deploy Privatebin using this Ansible role, follow these steps:\n\n**1. Set up your project directory structure:**\n```shell\nansible_structure\n├── playbook\n│   └── function_privatebin_deploy.yml # Playbook\n└── inventory\n    ├── group_vars\n    │   └── privatebin\n    │       └── privatebin_vars.yml # Overwrite variables in group_vars (optional)\n    ├── hosts\n    └── host_vars\n        └── privatebin.voidquark.com\n            └── host_vars.yml # Overwrite variables in host_vars (optional)\n```\n**2. Install the Ansible Privatebin Role from Ansible Galaxy:**\n```shell\nansible-galaxy install voidquark.privatebin\n```\n**3. Create your inventory - `inventory/hosts`**\n```shell\n[privatebin]\nprivatebin.voidquark.com\n```\n**4. Create your playbook - `playbook/function_privatebin_deploy.yml`**\n```yaml\n- name: Manage Privatebin service\n  hosts: privatebin\n  gather_facts: false\n  become: true\n  roles:\n    - role: voidquark.privatebin\n```\n**5. Execute the playbook**\n```shell\n# Deployment\nansible-playbook -i inventory/hosts playbook/function_privatebin_deploy.yml\n```\n\n## License\n\nMIT\n\n## Contribution\n\nFeel free to customize and enhance the role according to your needs.\nYour feedback and contributions are greatly appreciated. Please open an issue or submit a pull request with any improvements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidquark%2Fprivatebin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoidquark%2Fprivatebin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidquark%2Fprivatebin/lists"}