entercloudsuite.filesystem

Ansible 角色:文件系统

构建状态 Galaxy

创建分区、文件系统并挂载

需求

此角色需要 Ansible 2.2 或更高版本。

角色变量

请参阅 https://github.com/AerisCloud/ansible-disk

文件系统剧本

使用默认变量运行:

- hosts: all
  roles:
    - role: entercloudsuite.filesystem
      disk_additional_disks:
        - disk: /dev/vdb
          fstype: xfs
          mount_options: defaults
          mount: /example
          disable_periodic_fsck: false

测试

测试使用 Molecule 进行。

  1. 运行 molecule create 在本地引擎上启动目标 Docker 容器。
  2. 使用 molecule login 登录运行中的容器。
  3. 编辑角色文件。
  4. 在 molecule/default/requirements.yml 文件中添加其他所需的外部角色。
  5. 编辑 molecule/default/playbook.yml 文件。
  6. 在 molecule/default/tests 文件夹下定义基础设施测试,使用 goos 验证器。
  7. 准备好后,使用 molecule converge 运行 Ansible 剧本,使用 molecule verify 执行测试套件。
    注意,converge 过程会开始执行角色的语法检查。
    使用命令 molecule destroy 销毁 Docker 容器。

要用一个命令运行所有步骤,可以执行 molecule test

许可证

MIT

关于项目

Creating partition, filesystem and mounting it

安装
ansible-galaxy install entercloudsuite.filesystem
许可证
mit
下载
15.6k