Back to Trending
RepositoryPython
nextcloud

nextcloud/ansible-collection-nextcloud-admin

Manage your nextcloud server with ansible. Community developed and maintained.

167stars
90forks
5issues
2views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: ansible-role

#1 Repository of the month

1
TINIX TRENDING·Topic: ansible-modules

#1 Repository of the month

2
TINIX TRENDING·Topic: ansible-collection

#2 Repository of the month

GitHub License GitHub Release Ansible Collection Version Ansible Collection Downloads Collection tests Static Badge codecov

Ansible collection for nextcloud administration

This repository hosts the nextcloud.admin Ansible Collection.

The collection includes a variety of Ansible content to help automate the management of nextcloud, as well as provisioning and maintenance of instances of nextcloud.

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.15.0.

Plugins and modules within a collection may be tested with only specific Ansible versions.

Python Support

  • Collection tested on 3.12+

Supported nextcloud version

This collection supports Nextcloud versions: 30, 31, 32(latest) The community makes it's best efforts to keep tested versions updated with Nextcloud release schedule.

Included content

Modules

NameDescription
nextcloud.admin.run_occRun the occ command line tool with given arguments.
nextcloud.admin.app_infoReturn state, version, updates and path of one external application.
nextcloud.admin.appManage nextcloud external applications (install, remove, disable, etc)
nextcloud.admin.user_listList configured users on the server with optional user infos
nextcloud.admin.usershort_description: Manage a Nextcloud user.
nextcloud.admin.group_listList configured groups on the server with optional group infos
nextcloud.admin.groupManage Nextcloud groups.

Roles

NameDescription
nextcloud.admin.backup (beta)Create a backup of a Nextcloud server
nextcloud.admin.install_nextcloudInstall and configure an Nextcloud instance for a Debian/Ubuntu server

Installation and Usage

Dependencies

netaddr Python Library

Content in this collection requires the network address manipulation library to manipulate network address. You can install it with:

    pip3 install netaddr

required standalone roles

By default, some roles in this collection are dependant of standalone roles from other namespaces. (this can be disabled).

Due to some limitations, ansible-galaxy does not install them automatically, them need to be installed afterward.

Once the collection is installed, run the command ansible-galaxy role install -r <this_collection_folder>/requirements.yml.

Alternatively, you can also add the content of this file in your own requirements.yml file prior to installing the collection

Installing the Collection from Ansible Galaxy

Before using the nextcloud collection, you need to install it with the Ansible Galaxy CLI:

ansible-galaxy collection install nextcloud.admin

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: nextcloud.admin
    version: 2.3.0

Using modules from the Nextcloud Collection in your playbooks

It's preferable to use content in this collection using their Fully Qualified Collection Namespace (FQCN), for example nextcloud.admin.run_occ:

---
- hosts: nextcloud_host
  gather_facts: false
  become: true
  tasks:
    - name: list installed apps
      nextcloud.admin.run_occ:
        nextcloud_path: /var/www/nextcloud
        command: app:list

If upgrading older playbooks from <2.0.0, you can minimise your changes by defining collections in your play and refer to this collection's role as install_nextcloud, instead of nextcloud.admin.install_nextcloud, as in this example:

---
- hosts: localhost
  gather_facts: false
  connection: local

  collections:
    - nextcloud.admin

  tasks:
    - name: deploy nextcloud and dependencies
      include_role:
        name: install_nextcloud

For documentation on how to use:

  • individual modules: please use ansible-doc command after installing this collection.
  • included roles: as per ansible standard, ansible role are documented in their own README file.

Testing and Development

If you want to develop new content for this collection or improve what's already here, the easiest way to work on the collection is to clone it into one of the configured COLLECTIONS_PATHS, and work on it there.

Testing with molecule

The tests directory contains playbooks for running integration tests on various scenarios. There are also integration tests in the molecule directory

Publishing New Versions

Releases are automatically built and pushed to Ansible Galaxy for any new tag.

License

BSD

See LICENCE to see the full text.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
O-X-L/ansible-opnsense

Ansible Collection to manage OPNsense firewalls using their API

515
Nov 17, 2026
RepositoryPython
grafana/grafana-ansible-collection

grafana.grafana Ansible collection provides modules and roles for managing various resources on Grafana Cloud and roles to manage and deploy Grafana Agent and Grafana

247
Dec 1, 2026
RepositoryPython
oVirt/ovirt-ansible-collection

Ansible collection with official oVirt modules and roles

81
Nov 12, 2026
RepositoryPython
telekom-mms/ansible-collection-icinga-director

An Ansible collection that contains modules to change objects in Icinga 2 using the director API.

81
Nov 18, 2026
RepositoryRuby
elastic/ansible-elasticsearch

Ansible playbook for Elasticsearch

1.6k
Jun 24, 2022
RepositoryJinja
hifis-net/ansible-collection-toolkit

This Ansible collection provides production-ready Ansible roles used for providing services used in research and by research software engineers, but not exclusively.

133
Nov 23, 2026
RepositoryPython
bregman-arie/devops-exercises

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

87.1k
Dec 27, 2025
RepositoryPython
ansible/ansible

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.

71.6k
Nov 23, 2026
RepositoryPython
trailofbits/algo

Set up a personal VPN in the cloud

30.5k
Dec 2, 2026