{"id":21074208,"url":"https://github.com/hrafnthor/ansible-base-server","last_synced_at":"2026-04-08T14:32:03.200Z","repository":{"id":183254653,"uuid":"660665273","full_name":"hrafnthor/ansible-base-server","owner":"hrafnthor","description":"Common base actions needed on servers","archived":false,"fork":false,"pushed_at":"2023-10-24T21:08:58.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-10T12:52:57.527Z","etag":null,"topics":["ansible","ansible-role","linux"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrafnthor.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}},"created_at":"2023-06-30T14:30:28.000Z","updated_at":"2025-01-29T13:10:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9c53c6d-d508-4203-851a-a9afa655e7bf","html_url":"https://github.com/hrafnthor/ansible-base-server","commit_stats":null,"previous_names":["hrafnthor/ansible-base-server"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hrafnthor/ansible-base-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrafnthor%2Fansible-base-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrafnthor%2Fansible-base-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrafnthor%2Fansible-base-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrafnthor%2Fansible-base-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrafnthor","download_url":"https://codeload.github.com/hrafnthor/ansible-base-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrafnthor%2Fansible-base-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31559766,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"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-role","linux"],"created_at":"2024-11-19T19:15:00.854Z","updated_at":"2026-04-08T14:32:03.177Z","avatar_url":"https://github.com/hrafnthor.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible-base-server\nCommon base actions needed on servers\n\n### Host configuration file\n\nThe following are the options available with the task:\n\n```yaml\n#\n# Operating System specific values\n#\n###########################################\n\nubuntu_version_name: non empty string \u003crequired\u003e\nsystemctl:\n  # sets the system swappiness level, i.e the aggressiveness \n  # at which the kernel may swap memory. 0 means least aggressive\n  # while 100 is maximum aggressiveness.\n  swappiness: [int]\n\n#\n#   OpenSSH configuration   \n#\n###########################################\nssh_users: \n  # single (or list of) user(s) that should have ssh access\n  - [string]\n# the ssh port to listen to [0, 65535]\nssh_port: [int] \n\n#\n#   User configuration\n#\n###########################################\n\ndisable_root_login: boolean\nuser_groups: array of groups to create\n  - id:\tinteger\n    name: non empty string \u003crequired if creating group\u003e\n\nusers:\tarray of users to create\n  - id: integer\n    name: non empty string \u003crequired\u003e\n    comment: non empty string\n    group:\n      id: integer\t\u003crequired if group is defined\u003e\n      name: non empty string \u003crequired if group is defined\u003e\n    groups:\n      - hrafn\n      - sudo\n    password: non empty string. Defaults to '!' (locked user)\n    sudoer_file_nopasswd: boolean. Default false\n    shell: [/bin/bash, /bin/zsh]\n    disable_login: boolean. Default false\n    create_home: boolean. Default true\n    ssh:\n      authorized_keys: array of non empty strings\n\n\n#\n#   UFW configuration\n#\n###########################################\n\n# Existence of 'ufw' will install it.\nufw:\n  state: [enabled, disabled, reloaded, reset]\n  logging: [on, off, low, medium, high, full]\n  defaults:\n    incoming: [deny, allow, reject]\n    outgoing: [deny, allow, reject]\n  incoming:\n    - comment: non empty string \u003crequired\u003e\n      policy: [allow, limit, deny, reject] \u003crequired\u003e\n      interface: non empty string\n      delete: boolean. Removes rule if exists\n      from_ip: ipv4/ipv6 number, defaults to 'any'\n      to_port: integer between [0, 65535] \u003crequired\u003e\n      protocol: [any (default), tcp, udp, ipv6, esp, ah, gre, igmp]\n  outgoing:\n    - comment: non empty string\t\u003crequired\u003e\n      policy: [allow, limit, deny, reject] \u003crequired\u003e\n      interface: non empty string\n      delete: boolean. Removes rule if exists\n      to_ip: ipv4/v6 number, defaults to 'any'\n      to_port: integer between 0 and 65535 \u003crequired\u003e\n      protocol: [any (default), tcp, udp, ipv6, esp, ah, gre, igmp]\n\n#\n# fail2ban configuration\n#\n#########################################\n\n# Existence of 'fail2ban' will install it.\nfail2ban:\n  # Indicates the state change that should be applied via systemd at the end of fail2ban configuration\n  state: [started, reloaded, restarted, stopped]\n  # If present, will cause a configuration file to be configured at '/etc/fail2ban/fail2ban.local'\n  config:\n    # Indicates if a backup should be made of the configuration file that might already exist.\n    # Defaults to 'false'\n    backup: [boolean]\n    # If true, indicates that the file should be generated from a template path (referenced\n    # file needs to be inside the /templates directory).\n    # If false, then a direct file copy will be performed from the files path (referenced file \n    # needs to be inside /files directory).\n    is_template: [boolean]\n    # The file path relative to the type directory (templates/files).\n    path: [string]\n  # If present, will cause a jail file to be configured at '/etc/fail2ban/jail.local'\n  jail:\n    # Indicates if a backup should be made of any jail file that might already exist.\n    # Defaults to 'false'.\n    backup: [boolean]\n    # If true, indicates that the file should be generated from a template path (referenced\n    # file needs to be inside the /templates directory).\n    # If false, then a direct file copy will be performed from the files path (referenced file \n    # needs to be inside /files directory).\n    is_template: [boolean]\n    # The file path relative to the type directory (templates/files).\n    path: [string]\n  # If present, will configure individual jails at '/etc/fail2ban/jail.d/name.local'\n  jails:\n    # (required) the name of the file without ending\n    name: [string]\n    # Indicates if a backup should be made of any jail files that might already \n    # exist with the given name. Defaults to false.\n    backup: [boolean]\n    # If true, indicates that the file should be generated from a template path (referenced\n    # file needs to be inside the /templates directory).\n    # If false, then a direct file copy will be performed from the files path (referenced file \n    # needs to be inside /files directory).\n    is_template: [boolean]\n    # The file path relative to the type directory (templates/files)\n    path: [string]\n  # If present, will configure individual jails at '/etc/fail2ban/filters/name.conf'\n  filters:\n    # (required) the name of the file without ending\n    name: [string]\n    # Indicates if a backup should be made of any jail files that might already \n    # exist with the given name. Defaults to false.\n    backup: [boolean]\n    # If true, indicates that the file should be generated from a template path (referenced\n    # file needs to be inside the /templates directory).\n    # If false, then a direct file copy will be performed from the files path (referenced file \n    # needs to be inside /files directory).\n    is_template: [boolean]\n    # The file path relative to the type directory (templates/files)\n    path: [string]\n\n#\n#       Docker installation\n#\n######################################### \n\n# Existence of 'docker' will install docker\ndocker:\n  # Existence of 'compose' will install compose\n  compose:\n      # the version number of compose to install. [required]\n      version: [string]\n\n#\n#       logrotate configuration\n#\n#########################################\n\n# The following variables are defined in the dependency 'robertdebock/ansible-role-logrotate'\n\n# What the default frequency should be. If missing, defaults to weekly\nlogrotate_frequency: [daily, weekly, monthly]\n# How many files to keep. If missing, defaults to 4\nlogrotate_keep: [int]\n# If compression should be used. If missing, defaults to yes\nlogrotate_compress: [boolean]\n# Individual log rotate entries\nlogrotate_entries:\n    # (required) the name used for the logrotate file\n  - name: [string]\n    # (required) logrotate supported path to log file/s\n    path: [string] \n    # overrides the default frequency value for this entry only\n    frequency: [daily, weekly, monthly]\n    # overrides the default logrotate keep value for this entry only.\n    keep: [int]\n    # overrides the default logrotate compress value for this entry only.\n    compress: [boolean]\n    # copy the original log file without modifying it.\n    # see: https://man.archlinux.org/man/logrotate.8.en#copy\n    copylog: [boolean]\n    # truncate the original file to zero after creating a copy.\n    # see: https://man.archlinux.org/man/logrotate.8.en#copytruncate\n    copytruncate: [boolean]\n    # postpone compression of the previous log file to the next rotation cycle.\n    # see: https://man.archlinux.org/man/logrotate.8.en#delaycompress\n    delaycompress: [boolean]\n    # use yesterdays date rather than today when creating the 'dateext' extension\n    # see: https://man.archlinux.org/man/logrotate.8.en#dateyesterday\n    dateyesterday: [boolean]\n    # command to run after log file rotation\n    postrotate: [string]\n    # immediatly after rotation the log file is created.\n    # see: https://man.archlinux.org/man/logrotate.8.en#create\n    create: [boolean]\n    # if the log file is missing, go on to the next one without issuing an error message.\n    missingok: [boolean]\n    # if the log file is missing, issue an error. This is default.\n    # see: https://man.archlinux.org/man/logrotate.8.en#notifempty\n    nomissingok: [boolean]\n    # the chmod to use when using 'create'\n    create_mode: [string]\n    # the user owner of the file when using 'create'\n    create_user: [string]\n    # the group owner of the file when using 'create'\n    create_group: [string]\n    # archive old versions of log files adding a date extension rather than numbers.\n    # see: https://man.archlinux.org/man/logrotate.8.en#dateext\n    dateext: [boolean]\n    # the dateformat to use when using 'dateext'\n    # see: https://man.archlinux.org/man/logrotate.8.en#dateformat\n    dateformat: [string]\n    # the size at which logs are rotate if they surpass it, but not until the next rotation 'frequency' is reached.\n    # see: https://man.archlinux.org/man/logrotate.8.en#minsize\n    minsize: [string]\n    # do not rotate the log if it is empty.\n    # see: https://man.archlinux.org/man/logrotate.8.en#notifempty\n    notifempty: [boolean]\n    # if true then scripts matched in rules are only run once even if they are defined for multiple rules.\n    # see: https://man.archlinux.org/man/logrotate.8.en#sharedscripts\n    sharedscripts: [boolean]\n\n```\n### Dependencies\n\n#### [robertdebock/ansible-role-logrotate](https://github.com/robertdebock/ansible-role-logrotate)\n\n### License\n\n[Apache 2.0](https://github.com/hrafnthor/ansible-base-server/blob/main/LICENSE)\n\n### Author\n\n[Hrafn Thorvaldsson](https://github.com/hrafnthor)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrafnthor%2Fansible-base-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrafnthor%2Fansible-base-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrafnthor%2Fansible-base-server/lists"}