Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cans/directory-make
Simple Ansible Role that creates directories
https://github.com/cans/directory-make
Last synced: 19 days ago
JSON representation
Simple Ansible Role that creates directories
- Host: GitHub
- URL: https://github.com/cans/directory-make
- Owner: cans
- License: gpl-2.0
- Created: 2017-08-03T22:31:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-23T15:18:58.000Z (over 6 years ago)
- Last Synced: 2024-11-14T20:18:32.833Z (3 months ago)
- Language: Shell
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
directory-make
==============A role that ensures some directories exist and have the right permission.
Each directory is described as follows:
- group: The name of the group the directory should belong to (default: dirmake\_group)
mode: The mode the directory should have (default: 0700)
owner: The name of the user that should own the directory (default: dirmake\_user)
path: Path of the directory you need to ensure exists (no default, mandatory)
Requirements
------------This role has no requirements.
Role Variables
--------------All variables in this roles are namespaced with the prefix `dirmake_`.
- `dirmake_directories`: the list of directories to check, specified by items as specified above (default: [])
- `dirmake_group`: the default group the directories should belong to (default: omit, meaning will be determined by the system)
- `dirmake_mode`: the default mode the directories should have (default: 0700)
- `dirmake_owner`: the default owner for the directories (default: remote\_user)Dependencies
------------This role has no dependencies.
Example Playbook
----------------Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
vars:
dirmake_directories:
- path: "/home/user/some/path"
owner: "alice"
mode: 0600
- path: "/home/user/some/other/path"
- path: "/home/user/yet/another/directory"
group: "bob"
roles:
- role: cans.directory-make- hosts: servers
vars_files:
- vars/part1.yml # defines directory_list_1
- vars/part2.yml # defines directory_list_2
roles:
- role: cans.directory-make
dirmake_directories: "{{ directory_list_1 + directory_list_2 }}"License
-------GPLv2
Author Information
------------------Copyright © 2017, Nicolas CANIART.