Advertisement
sandervanvugt

RHCE storage lab part 2

Sep 1st, 2022
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. ---
  2. - name: setup storage
  3. hosts: all
  4. vars:
  5. dummy: 10
  6. tasks:
  7. - name: check if sdb exists
  8. fail:
  9. msg: quitting on this host as there is no sdb
  10. when: ansible_facts['devices']['sdb'] is not defined
  11. - name: testing sdb presence
  12. debug:
  13. msg: we have an sdb
  14. when: ansible_facts['devices']['sdb']
  15. - name: configure the device
  16. debug:
  17. msg: using parted to create partition
  18. - name: create volume group
  19. debug:
  20. msg: use lvg (?) to create the volume group
  21. - name: gather facts again
  22. setup:
  23. - name: setup big lv
  24. debug:
  25. msg: this is where we create a big lv
  26. when: dummy > 5
  27. - name: setup small lv
  28. debug:
  29. msg: this is where we create a small lv
  30. when: dummy < 5
  31. - name: create the filesystem
  32. debug:
  33. msg: use filesys to create the filesystem
  34. - name: mount the filesystem
  35. debug:
  36. msg: mount the volume on a directory (persistently?)
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement