aeriscloud / ansible-disk Goto Github PK
View Code? Open in Web Editor NEWFormat extra disks and attach them to different mount points.
License: MIT License
Format extra disks and attach them to different mount points.
License: MIT License
If I want to use the module against multiple disks, how do I do that?
In my group_vars, I've got:
disk_additional_disks:
- disk: /dev/xvdf
fstype: ext4
opts: "-m 1"
mount_options: defaults
mount: /mnt/tmp
- disk: /dev/xvdg
fstype: ext4
opts: "-m 1"
mount_options: defaults
mount: /mnt/tmp2
But it's only executing against /dev/xvdf
parted --script /dev/sdb \
mklabel gpt \ mkpart primary 1MiB 100%
The task "Ensure the mount directory exists" should take disk_user and disk_group from item. Right now, it's always defaulting to root:
- name: "Ensure the mount directory exists"
file:
path: '{{ item.mount }}'
owner: '{{ item.disk_user | default("root") }}' #here
group: '{{ item.disk_group | default("root") }}' #here
state: directory
with_items: '{{ disk_additional_disks }}'
tags: ['disk']
_nvme_ioctl IOError: [Errno 22] Invalid argument
when attempting to attach Azure disk.
Version @ e303c7f works fine, version @ c0ac697 (current master) fails.
fatal: [bk-test-vm1]: FAILED! => {"changed": false, "module_stderr": "Shared connection to bk-test-vm1 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/home/agrimetrics/.ansible/tmp/ansible-tmp-1545234609.6925719-280473579861797/AnsiballZ_disk_config.py\", line 113, in <module>\r\n _ansiballz_main()\r\n File \"/home/agrimetrics/.ansible/tmp/ansible-tmp-1545234609.6925719-280473579861797/AnsiballZ_disk_config.py\", line 105, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/home/agrimetrics/.ansible/tmp/ansible-tmp-1545234609.6925719-280473579861797/AnsiballZ_disk_config.py\", line 48, in invoke_module\r\n imp.load_module('__main__', mod, module, MOD_DESC)\r\n File \"/tmp/ansible_disk_config_payload_BSZXKz/__main__.py\", line 180, in <module>\r\n File \"/tmp/ansible_disk_config_payload_BSZXKz/__main__.py\", line 164, in main\r\n File \"/tmp/ansible_disk_config_payload_BSZXKz/__main__.py\", line 99, in __init__\r\n File \"/tmp/ansible_disk_config_payload_BSZXKz/__main__.py\", line112, in ctrl_identify\r\n File \"/tmp/ansible_disk_config_payload_BSZXKz/__main__.py\", line 108, in _nvme_ioctl\r\nIOError: [Errno 22] Invalid argument\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.