Ansible role to manage systemd mount points
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OpenDev Sysadmins e79bebfa34 OpenDev Migration Patch 1 day ago
defaults Add basic tests 1 year ago
doc docs: drop sphinxmark 2 weeks ago
examples Initial Commit 1 year ago
handlers Initial Commit 1 year ago
html-docs Initial Commit 1 year ago
meta Add Bionic testing 11 months ago
releasenotes Update master for stable/stein 1 week ago
tasks Add mount state rescue block 6 months ago
templates Ensure mounts are able to be network aware 3 months ago
tests Set container_name as host_var in test inventory 6 months ago
vars Change mount states to ensure uptime 1 year ago
zuul.d switch documentation job to new PTI 8 months ago
.gitignore Updated from OpenStack Ansible Tests 6 months ago
.gitreview OpenDev Migration Patch 1 day ago
CONTRIBUTING.rst Replace Chinese punctuation with English punctuation 5 months ago
LICENSE Initial Commit 1 year ago
README.md Add release note link in README 9 months ago
Vagrantfile Updated from OpenStack Ansible Tests 6 months ago
ansible-role-requirements.yaml Initial Commit 1 year ago
bindep.txt Updated from OpenStack Ansible Tests 4 weeks ago
manual-test.rc Initial Commit 1 year ago
run_tests.sh Updated from OpenStack Ansible Tests 1 month ago
setup.cfg Change openstack-dev to openstack-discuss 4 months ago
setup.py Initial Commit 1 year ago
tox.ini fix tox python3 overrides 6 months ago

README.md

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