Ansible role to manage systemd services
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.
OpenStack Proposal Bot 2b141286d0 Updated from OpenStack Ansible Tests 5 days ago
defaults Build out the PrivateNetwork function for services 2 months ago
doc docs: drop sphinxmark 3 weeks ago
examples Add tests to the service role 1 year ago
handlers Build out the PrivateNetwork function for services 2 months ago
html-docs Add tests to the service role 1 year ago
meta debian: add ci and update meta 2 weeks ago
releasenotes Update master for stable/stein 2 weeks ago
tasks Build out the PrivateNetwork function for services 2 months ago
templates Build out the PrivateNetwork function for services 2 months ago
tests Build out the PrivateNetwork function for services 2 months 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 6 days 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 10 months ago
Vagrantfile Updated from OpenStack Ansible Tests 6 months ago
ansible-role-requirements.yaml updated things so this role is usable 1 year ago
bindep.txt Updated from OpenStack Ansible Tests 1 month ago
manual-test.rc Initial Commit 1 year ago
run_tests.sh Updated from OpenStack Ansible Tests 5 days ago
setup.cfg Update home-page 3 months ago
setup.py Initial Commit 1 year ago
tox.ini fix tox python3 overrides 5 months ago

README.md

Ansible systemd_service

This Ansible role that installs and configures systemd unit files and all of its corresponding services. 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 this role in place clone the plugins repository before installing this role.

# git clone https://github.com/openstack/openstack-ansible-plugins /etc/ansible/roles/plugins

Release notes for the project can be found at: https://docs.openstack.org/releasenotes/ansible-role-systemd_service

You can also use the ansible-galaxy command on the ansible-role-requirements.yml file.

# ansible-galaxy install -r ansible-role-requirements.yml

Example playbook
- name: Create a systemd unit file for ServiceX
  hosts: localhost
  become: true
  roles:
    - role: "systemd_service"
      systemd_services:
        # Normal Service
        - service_name: ServiceX
          execstarts:
            - /path/ServiceX --flag1

        # Timer Service (AKA CRON)
        - service_name: TimerServiceX
          execstarts:
            - /path/TimerServiceX --flag1
          timer:
            state: "started"
            options:
              OnBootSec: 30min
              OnUnitActiveSec: 1h
              Persistent: true
      tags:
        - servicex-init