Commit 75b22aa1 authored by Mathias BOCQUET's avatar Mathias BOCQUET

Initial commit

parents
'tmpfs'. Ansible role to configure tmpfs filesystems.
Copyright © 2018-2019 Mathias Bocquet (mbocquet@sekoya.org)
This file is part of 'tmpfs' Ansible role.
This 'tmpfs' Ansible role is free software: you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This 'tmpfs' Ansible role is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
for more details.
You should have received a copy of the GNU Affero General Public License along
with this 'tmpfs' Ansible role. If not, see <http://www.gnu.org/licenses/>.
This diff is collapsed.
# tmpfs
Ansible role to configure tmpfs filesystems.
## Requirements
None.
## Role Variables
Many. See defaults/main.yml
## Dependencies
None.
## Install this role as submodule in a git repository
`git submodule add https://git.sekoya.org/mb/tmpfs.git roles/tmpfs`
## Example Playbook
- hosts: servers
roles:
- tmpfs
- hosts: servers
roles:
- { role: tmpfs, x: 42 }
## License
GPLv3
## Author Information
http://www.sekoya.org
---
# defaults file for tmpfs
# these are examples entries which should be placed in inventory files (group
# or host variables)
# FS mount points which should be tmpfs.
# tmpfs_fs:
# - mountpoint: '/tmp'
# options:
# - 'noatime'
# - 'nodev'
# - 'noexec'
# - 'nosuid'
# - mountpoint: '/var/tmp'
# options:
# - 'exec'
# - 'noatime'
# - 'nodev'
# - 'nosuid'
# - 'size=128M'
...
---
# handlers file for tmpfs
galaxy_info:
author: Mathias BOCQUET
description: Ansible role to configure tmpfs filesystems.
company: Sekoya.org (http://www.sekoya.org)
issue_tracker_url: https://git.sekoya.org/mb/tmpfs/issues
license: GPLv3
min_ansible_version: 1.2
platforms:
- name: Debian
versions:
#- all
- buster
#- etch
- jessie
#- lenny
- sid
#- squeeze
- stretch
#- wheezy
galaxy_tags:
- tmp
- tmpfs
- fstab
- filesystem
- sysadmin
dependencies: []
---
# tasks file for tmpfs
- name: mount
mount:
path: '{{ item.mountpoint }}'
src: tmpfs
fstype: tmpfs
state: mounted
opts: "{{ item.options | join (',') }}"
backup: yes
# We can't use a handler with parameters so we register the mount variable
# and will remount all fs with right options if necessary in the next play
register: mount
loop: "{{ tmpfs_fs }}"
when:
- ansible_virtualization_type != "lxc"
tags:
- tmpfs
- fstab
- mount
- name: remount
command: "mount -o remount,{{ item.options | join (',') }} {{ item.mountpoint }}"
args:
warn: false
when: mount.changed
loop: "{{ tmpfs_fs }}"
tags:
- tmpfs
- remount
...
---
- hosts: localhost
remote_user: root
roles:
- tmpfs
\ No newline at end of file
---
# vars file for tmpfs
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment