{"id":14984500,"url":"https://github.com/serversideup/ansible-role-linux-common","last_synced_at":"2025-04-10T20:34:26.600Z","repository":{"id":176698065,"uuid":"657761285","full_name":"serversideup/ansible-role-linux-common","owner":"serversideup","description":"A simple playbook to secure your server, prep your users, and prepare your server for other uses.","archived":false,"fork":false,"pushed_at":"2023-12-18T20:05:55.000Z","size":102,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T18:11:28.361Z","etag":null,"topics":["ansible","ansible-galaxy","ansible-playbook","ansible-playbooks","ansible-role","ansible-roles"],"latest_commit_sha":null,"homepage":"https://galaxy.ansible.com/serversideup/linux_common/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serversideup.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},"funding":{"github":"serversideup"}},"created_at":"2023-06-23T19:40:56.000Z","updated_at":"2025-02-17T03:25:55.000Z","dependencies_parsed_at":"2024-09-25T00:31:07.263Z","dependency_job_id":null,"html_url":"https://github.com/serversideup/ansible-role-linux-common","commit_stats":{"total_commits":56,"total_committers":1,"mean_commits":56.0,"dds":0.0,"last_synced_commit":"7198c34b715f8dd6b90ffa0bdc25bae0e036f44b"},"previous_names":["serversideup/ansible-role-linux-common"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serversideup%2Fansible-role-linux-common","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serversideup%2Fansible-role-linux-common/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serversideup%2Fansible-role-linux-common/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serversideup%2Fansible-role-linux-common/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serversideup","download_url":"https://codeload.github.com/serversideup/ansible-role-linux-common/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248290044,"owners_count":21078923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-playbooks","ansible-role","ansible-roles"],"created_at":"2024-09-24T14:09:10.458Z","updated_at":"2025-04-10T20:34:26.574Z","avatar_url":"https://github.com/serversideup.png","language":"Shell","funding_links":["https://github.com/sponsors/serversideup"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\t\u003ca href=\"https://github.com/serversideup/ansible-linux-common\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/serversideup/ansible-linux-common/main/.github/img/header.png\" width=\"1280\" alt=\"GitHub Header\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/serversideup/ansible-linux-common/actions/workflows/publish_docker-images-production.yml\"\u003e\u003cimg alt=\"Build Status\" src=\"https://img.shields.io/github/actions/workflow/status/serversideup/ansible-linux-common/release.yml\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://github.com/serversideup/ansible-linux-common/blob/main/LICENSE\" target=\"_blank\"\u003e\u003cimg src=\"https://badgen.net/github/license/serversideup/ansible-linux-common\" alt=\"License\"\u003e\u003c/a\u003e\n\t\u003ca href=\"https://github.com/sponsors/serversideup\"\u003e\u003cimg src=\"https://badgen.net/badge/icon/Support%20Us?label=GitHub%20Sponsors\u0026color=orange\" alt=\"Support us\"\u003e\u003c/a\u003e\n  \u003cbr /\u003e\n  \u003ca href=\"https://community.serversideup.net\"\u003e\u003cimg alt=\"Discourse users\" src=\"https://img.shields.io/discourse/users?color=blue\u0026server=https%3A%2F%2Fcommunity.serversideup.net\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://serversideup.net/discord\"\u003e\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/910287105714954251?color=blueviolet\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nHi! We're [Dan](https://twitter.com/danpastori) and [Jay](https://twitter.com/jaydrogers). We're a two person team with a passion for open source products. We created [Server Side Up](https://serversideup.net) to help share what we learn.\n\n### Find us at:\n\n* 📖 [Blog](https://serversideup.net) - get the latest guides and free courses on all things web/mobile development.\n* 🙋 [Community](https://community.serversideup.net) - get friendly help from our community members.\n* 🤵‍♂️ [Get Professional Help](https://serversideup.net/get-help) - get guaranteed responses within next business day.\n* 💻 [GitHub](https://github.com/serversideup) - check out our other open source projects\n* 📫 [Newsletter](https://serversideup.net/subscribe) - skip the algorithms and get quality content right to your inbox\n* 🐥 [Twitter](https://twitter.com/serversideup) - you can also follow [Dan](https://twitter.com/danpastori) and [Jay](https://twitter.com/jaydrogers)\n* ❤️ [Sponsor Us](https://github.com/sponsors/serversideup) - please consider sponsoring us so we can create more helpful resources\n\n### Our Sponsors\nAll of our software is free an open to the world. None of this can be brought to you without the financial backing of our sponsors.\n\n\u003cp align=\"center\"\u003e\u003ca href=\"https://github.com/sponsors/serversideup\"\u003e\u003cimg src=\"https://521public.s3.amazonaws.com/serversideup/sponsors/sponsor-box.png\" alt=\"Sponsors\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n#### Individual Supporters\n\u003c!-- supporters --\u003e\u003ca href=\"https://github.com/deligoez\"\u003e\u003cimg src=\"https://github.com/deligoez.png\" width=\"40px\" alt=\"deligoez\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/alexjustesen\"\u003e\u003cimg src=\"https://github.com/alexjustesen.png\" width=\"40px\" alt=\"alexjustesen\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003ca href=\"https://github.com/jeremykenedy\"\u003e\u003cimg src=\"https://github.com/jeremykenedy.png\" width=\"40px\" alt=\"jeremykenedy\" /\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\u003c!-- supporters --\u003e\n\nLinux Common\n=========\n\n A simple playbook to secure your server, prep your users, and prepare your server for other uses. \n\nRequirements\n------------\n\nFor now, this project focuses on supporting **Ubuntu 22.04** only. Choose any host that you'd like. All this role needs is an SSH connection to a user that has `sudo` privileges.\n\nRole Variables\n--------------\n\nYou can find all variables organized and documented in `defaults/main.yml`. Feel free to override any variable of your choice.\n\n```yml\n---\n###########################################\n# Basic Server Configuration\n###########################################\nserver_timezone: \"Etc/UTC\"\nserver_contact: changeme@example.com\n\n# SSH\nserver_ssh_port: \"22\"\n\n## Email Notifications\npostfix_hostname: \"{{ inventory_hostname }}\"\n\n## Set variables below to enable external SMTP relay\n# postfix_relayhost: \"smtp.example.com\"\n# postfix_relayhost_port: \"587\"\n# postfix_relayhost_username: \"myusername\"\n# postfix_relayhost_password: \"mysupersecretpassword\"\n\n###########################################\n# APT Configuration\n###########################################\n\n# Time is in seconds (default: 24 hours)\napt_cache_expiration: 86400\n\n# Common packages to install\ncommon_installed_packages:\n  - cron\n  - curl\n  - figlet\n  - fail2ban\n  - git\n  - htop\n  - logrotate\n  - mailutils\n  - ncdu\n  - ntp\n  - python3-minimal\n  - ssh\n  - tzdata\n  - ufw\n  - unattended-upgrades\n  - unzip\n  - wget\n  - zip\n\n# APT - Automatic Update Configuration\napt_periodic_update_package_lists: \"1\"\napt_periodic_download_upgradeable_packages: \"1\"\napt_periodic_autoclean_interval: \"7\"\napt_periodic_unattended_upgrade: \"1\"\n\n###########################################\n# Fun Terminal Customizations\n###########################################\nmotd_header_text: \"ServerSideUp\"\nmotd_header_text_color: '\\e[38;5;255m'\nmotd_header_background_color: '\\e[48;5;34m'\nmotd_hostname_text_color: '\\e[38;5;202m'\nmotd_services:\n  - ufw\n  - fail2ban\n  - postfix\n\n##############################################################\n# Users\n##############################################################\n\n### Use the template below to set users and their authorized keys\n## Passwords must be set with an encrypted hash. To do this, see the Ansible FAQ\n## https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-generate-encrypted-passwords-for-the-user-module\n\n# users:\n#   - username: alice\n#     name: Alice Smith\n#     state: present\n#     groups: ['adm','sudo']\n#     password: \"$6$mysecretsalt$qJbapG68nyRab3gxvKWPUcs2g3t0oMHSHMnSKecYNpSi3CuZm.GbBqXO8BE6EI6P1JUefhA0qvD7b5LSh./PU1\"\n#     shell: \"/bin/bash\"\n#     authorized_keys:\n#       - public_key: \"ssh-ed25519 AAAAC3NzaC1lmyfakeublickeyMVIzwQXBzxxD9b8Erd1FKVvu alice\"\n\n#   - username: bob\n#     name: Bob Smith\n#     state: present\n#     password: \"$6$mysecretsalt$qJbapG68nyRab3gxvKWPUcs2g3t0oMHSHMnSKecYNpSi3CuZm.GbBqXO8BE6EI6P1JUefhA0qvD7b5LSh./PU1\"\n#     groups: ['adm','sudo']\n#     shell: \"/bin/bash\"\n#     authorized_keys:\n#       - public_key: \"ssh-ed25519 AAAAC3NzaC1anotherfakekeyIMVIzwQXBzxxD9b8Erd1FKVvu bob\"\n\n### Additional users\n## You can also set additional users (great if you're working with contractors or clients on certain groups of servers)\n## These users will be flattened into the users list (if you set any settings below)\n\n# additional_users:\n#   - username: charlie\n#     name: Charlie Smith\n#     state: present\n#     groups: ['adm','sudo']\n#     password: \"$6$mysecretsalt$qJbapG68nyRab3gxvKWPUcs2g3t0oMHSHMnSKecYNpSi3CuZm.GbBqXO8BE6EI6P1JUefhA0qvD7b5LSh./PU1\"\n#     shell: \"/bin/bash\"\n#     authorized_keys:\n#       - public_key: \"ssh-ed25519 AAAAC3NzaC1lmyfakeublickeyMVIzwQXBzxxD9b8Erd1FKVvu alice\"\n\n#   - username: dana\n#     name: Dana Smith\n#     state: present\n#     password: \"$6$mysecretsalt$qJbapG68nyRab3gxvKWPUcs2g3t0oMHSHMnSKecYNpSi3CuZm.GbBqXO8BE6EI6P1JUefhA0qvD7b5LSh./PU1\"\n#     groups: ['adm','sudo']\n#     shell: \"/bin/bash\"\n#     authorized_keys:\n#       - public_key: \"ssh-ed25519 AAAAC3NzaC1anotherfakekeyIMVIzwQXBzxxD9b8Erd1FKVvu bob\"\n```\n\nDependencies\n------------\nSee [`requirements.yml`](./requirements.yml) for all collection dependencies.\n\nTo install all dependencies, run:\n\n```bash\nansible-galaxy install -r requirements.yml\n```\n\nExample Playbook\n----------------\n\nIncluding an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:\n\n    - hosts: servers\n      roles:\n         - { role: serversideup.linux_common, server_timezone: 'America/Chicago' }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserversideup%2Fansible-role-linux-common","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserversideup%2Fansible-role-linux-common","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserversideup%2Fansible-role-linux-common/lists"}