Giter Site home page Giter Site logo

amandacameron / com.devture.ansible.role.systemd_service_manager Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devture/com.devture.ansible.role.systemd_service_manager

0.0 2.0 0.0 11 KB

An Ansible role which manages systemd services

Makefile 100.00%

com.devture.ansible.role.systemd_service_manager's Introduction

systemd service manager Ansible role

This is an Ansible role which manages systemd services.

Features

  • starting (restarting) services, in order, according to their priority. Services can all be stopped cleanly and then started anew, or they can be restarted one-by-one (see devture_systemd_service_manager_service_restart_mode)

  • making services auto-start (see devture_systemd_service_manager_services_autostart_enabled)

  • verifying services managed to start (see devture_systemd_service_manager_up_verification_enabled)

  • stopping services, in order, according to their priority

  • starting/stopping all defined services, or a group of services (--tags=restart-group, --tags=stop-group)

  • restarting services by cleanly stopping them and restarting them, or one by one

Usage

Example playbook:

- hosts: servers
  roles:
    - when: devture_systemd_service_manager_enabled | bool
      role: galaxy/com.devture.ansible.role.systemd_service_manager

Example playbook configuration (group_vars/servers or other):

# See `devture_systemd_service_manager_services_list_auto` and `devture_systemd_service_manager_services_list_additional`
devture_systemd_service_manager_services_list_auto: |
  {{
    ([{'name': 'some-service.service', 'priority': 1000}])
    +
    ([{'name': 'another-service.service', 'priority': 1500}])
  }}

Example playbook invocations tags (e.g. ansible-playbook -i inventory/hosts setup.yml --tags=XXXXX):

  • restart, restart-all, start-all - restarts all services and potentially makes them auto-start (depending on devture_systemd_service_manager_services_autostart_enabled)

  • restart-group, start-group - restarts services belonging to the specified group (e.g. --extra-vars="group=core")

  • stop, stop-all - stops all services

  • stop-group - stops services belonging to the specified group (e.g. --extra-vars="group=core")

com.devture.ansible.role.systemd_service_manager's People

Contributors

spantaleev avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.