{"id":21605986,"url":"https://github.com/archf/ansible-role-fs_setup","last_synced_at":"2025-10-29T07:04:00.161Z","repository":{"id":89975046,"uuid":"236591292","full_name":"archf/ansible-role-fs_setup","owner":"archf","description":"Configure filesystems and disks using an input compatible with cloud-init","archived":false,"fork":false,"pushed_at":"2020-01-27T20:48:11.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-29T07:03:58.395Z","etag":null,"topics":["ansible-role"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/archf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-01-27T20:47:46.000Z","updated_at":"2020-01-27T21:00:52.000Z","dependencies_parsed_at":"2023-05-30T18:00:32.365Z","dependency_job_id":null,"html_url":"https://github.com/archf/ansible-role-fs_setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/archf/ansible-role-fs_setup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archf%2Fansible-role-fs_setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archf%2Fansible-role-fs_setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archf%2Fansible-role-fs_setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archf%2Fansible-role-fs_setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archf","download_url":"https://codeload.github.com/archf/ansible-role-fs_setup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archf%2Fansible-role-fs_setup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281577701,"owners_count":26524886,"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","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-role"],"created_at":"2024-11-24T20:18:27.029Z","updated_at":"2025-10-29T07:04:00.144Z","avatar_url":"https://github.com/archf.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible-fs_setup\n\nA role to create filesystems and to partition block devices\n\n## Ansible requirements\n\n### Ansible version\n\nMinimum required ansible version is 2.8.\n\n### Ansible role dependencies\n\nNone.\n\n## Installation\n\n### Install with Ansible Galaxy\n\n```shell\nansible-galaxy install archf.fs_setup\n```\n\nBasic usage is:\n\n```yaml\n- hosts: all\n  roles:\n    - role: archf.fs_setup\n```\n\n### Install with git\n\nIf you do not want a global installation, clone it into your `roles_path`.\n\n```shell\ngit clone git@github.com:archf/ansible-fs_setup.git /path/to/roles_path\n```\n\nBut I often add it as a submdule in a given `playbook_dir` repository.\n\n```shell\ngit submodule add git@github.com:archf/ansible-fs_setup.git \u003cplaybook_dir\u003e/roles/fs_setup\n```\n\nAs the role is not managed by Ansible Galaxy, you do not have to specify the\ngithub user account.\n\nBasic usage is:\n\n```yaml\n- hosts: all\n  roles:\n  - role: fs_setup\n```\n## User guide\n\n### Requirements\n\nNone.\n\n### Introduction\n\nA simple role to configure filesystems using an input compatible with\n`cloud-init` `fs_setup` or `disk_setup` module.\n\nSee [cloud-init](https://cloudinit.readthedocs.io/en/latest/topics/examples.html#create-partitions-and-filesystems)\ndocumentation.\n\n### Usage\n\n\n## Role Variables\n\nVariables are divided in three types.\n\nThe [default vars](#default-vars) section shows you which variables you may\noverride in your ansible inventory. As a matter of fact, all variables should\nbe defined there for explicitness, ease of documentation as well as overall\nrole manageability.\n\nThe [mandatory variables](#mandatory-variables) section contains variables that\nfor several reasons do not fit into the default variables. As name implies,\nthey must absolutely be defined in the inventory or else the role will\nfail. It is a good thing to avoid reach for these as much as possible and/or\ndesign the role with clear behavior when they're undefined.\n\nThe [context variables](#context-variables) are shown in section below hint you\non how runtime context may affects role execution.\n\n### Default vars\n\nRole default variables from `defaults/main.yml`.\n\n```yaml\n# Print extra debug information.\ndebug: false\n\n# Global defaults for fs_setup. Can be overriden on a per filesystem\n# basis.\n\n# Default filesystem type to create.\nfs_default_filesystem: 'ext4'\n\n# Overwrite existing filesystems. Use with caution.\nfs_replace_fs: false\n\n# Default behavior is to mount the created filesystems.\nfs_mount_state: mounted\n\n# Default mount opts and passno.\nfs_mount_opts: \"defaults\"\nfs_mount_passno: 0\n\n# Default filesystem owner/group/mode.\nfs_owner: root\nfs_group: root\nfs_mode: \"0755\"\n\n# cloud-init format extended with mount/perms options. see\n# https://cloudinit.readthedocs.io/en/latest/topics/examples.html#create-partitions-and-filesystems.\n# added mount options are:\n#   - state (defaults to 'fs_mount_state')\n#   - owner (defaults to 'fs_owner')\n#   - group (defaults to 'fs_group')\n#   - path (path where to mount the filesystem which are always mounted by label)\n#   - mount_opts (defaults to 'fs_mount_opts')\n#   - mount_passno (defaults to 'fs_mount_passno')\n#   - mode (defaults to 'fs_mode')\n\nfs_setup:\n  - label: hdfs-data01\n    filesystem: 'xfs'\n    device: '/dev/vdb1'\n    path: /opt/data01\n    mount_opts: noatime\n    mount_passno: 0\n    mode: '0755'\n\n  - label: hdfs-data02\n    filesystem: 'xfs'\n    device: '/dev/vdb2'\n    path: /opt/data02\n    mount_opts: noatime\n\n  - label: hdfs-data03\n    filesystem: 'xfs'\n    device: '/dev/vdb3'\n    path: /opt/data03\n    mount_opts: noatime\n\n  - label: hdfs-data04\n    filesystem: 'xfs'\n    device: '/dev/vdb4'\n    path: /opt/data04\n    mount_opts: noatime\n\n# Global defaults for disk_setup. Can be overriden on a per partition basis.\n\n# Print current partition information.\ndisk_state: info\n\n# Default 'table_type'.\ndisk_table_type: 'gpt'\n\n# cloud-init format partionning scheme.\n# Notes:\n#   - table_type is consumed by the parted module 'label' arg.\n#       =\u003e supported values: [ aix, amiga, bsd, dvh, gpt, loop, mac, msdos, pc98, sun ]\n#       =\u003e defaults to gpt''\ndisk_setup:\n   vdb:\n       # table_type: 'gpt'\n       state: present\n       layout:\n           - [0, 25]\n           - [25, 50]\n           - [50, 75]\n           - [75, 100]\n       # overwrite: false\n\n```\n\n### Mandatory variables\n\nNone.\n\n### Context variables\n\nNone.\n\n\n\n## License\n\nBSD.\n\n## Author Information\n\nFelix Archambault.\n\n---\nPlease do not edit this file. This role `README.md` was generated using the\n'ansidoc' python tool available on pypi!\n\n*Installation:*\n\n```shell\npip3 install ansidoc\n```\n\n*Basic usage:*\n\nValidate output by running a dry-run (will output result to stdout)\n```shell\nansidoc --dry-run \u003crolepath\u003e\n```\n\nGenerate you role readme file. Will write a `README.md` file under\n`\u003crolepath\u003e/README.md`.\n```shell\nansidoc \u003crolepath\u003e\n```\n\nAlso usable programatically from Sphinx.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchf%2Fansible-role-fs_setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchf%2Fansible-role-fs_setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchf%2Fansible-role-fs_setup/lists"}