Ansible role to manage systemd mount points
29412148c3
The mount state could be volitile making it so the "restart-or-reload" option fails to execute. If this happens the task will now be rescued and the mount state will be attempted using the regular systemd module. Change-Id: I86fc03ad7c72fa4cfdfc598f552f936dda653926 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com> |
||
---|---|---|
defaults | ||
doc | ||
examples | ||
handlers | ||
html-docs | ||
meta | ||
releasenotes | ||
tasks | ||
templates | ||
tests | ||
vars | ||
zuul.d | ||
.gitignore | ||
.gitreview | ||
ansible-role-requirements.yaml | ||
bindep.txt | ||
CONTRIBUTING.rst | ||
LICENSE | ||
manual-test.rc | ||
README.md | ||
run_tests.sh | ||
setup.cfg | ||
setup.py | ||
tox.ini | ||
Vagrantfile |
Ansible systemd_mount
This Ansible role configures systemd mount files.
This role requires the openstack-ansible-plugins
repository to be available
on your local system. The Ansible galaxy resolver will not retrieve this role
for you. To get the plugins role in place clone the plugins repository
before running this role.
# git clone https://github.com/openstack/openstack-ansible-plugins /etc/ansible/roles/plugins
You can also use the ansible-galaxy
command on the ansible-role-requirements.yml
file.
# ansible-galaxy install -r ansible-role-requirements.yml
Release notes for the project can be found at: https://docs.openstack.org/releasenotes/ansible-role-systemd_mount
Example playbook
See the "defaults.yml" file for a full list of all available options.
- name: Create a systemd mount file for Mount1 and 2
hosts: localhost
become: true
roles:
- role: "systemd_mount"
systemd_mounts:
- what: '/var/lib/machines.raw'
where: '/var/lib/machines'
type: 'btrfs'
options: 'loop'
unit:
ConditionPathExists:
- '/var/lib/machines.raw'
state: 'started'
enabled: true
- config_overrides: {}
what: "10.1.10.1:/srv/nfs"
where: "/var/lib/glance/images"
type: "nfs"
options: "_netdev,auto"
unit:
After:
- network.target