Commit Graph

77 Commits (bb8bac490a1b4f1ac4b8e6c718057ad11726be62)

Author SHA1 Message Date
Toshio Kuratomi 7b100dd389 Be more specific in checking if a job restarted successfully.
Fixes: #9056
10 years ago
Toshio Kuratomi 36083c3b90 Failure to enable a service now fails the task
Fixes: 8855
10 years ago
Toshio Kuratomi a50258d26a remove debugging that was causing failure 10 years ago
Toshio Kuratomi 2e16bd3a44 Refactor the Linux service_enable() method
* Fix check_mode for initctl systems

Fixes #9009
10 years ago
Toshio Kuratomi 104401805b Revert "Refactor the Linux service_enable() method" needs some debugging
This reverts commit e294e31fd3.
10 years ago
Toshio Kuratomi c362902f50 Refactor the Linux service_enable() method
* Fix check_mode for initctl systems

Fixes #9009
10 years ago
James Cammarata 7edcf21bdc Move initscript rc check to later in service status check
Fixes #7284
10 years ago
Patrik Lundin 0abf14ff19 service: use self.changed in service_enable_rcconf().
This sets the "changed" result of the module when a rc file is modified.
Previously only --check mode would show that it was going to change.
10 years ago
James Cammarata 30d6713bf0 Add additional checks to detect upstart services
Also adds checks for the upstart version, in order to test check
support for manual vs. start on manual
10 years ago
Eri Bastos 6f8a29dc3d Proposed fix for issue #7757 10 years ago
Michael DeHaan 185d5a6221 Merge branch 'spelling' of git://github.com/cgar/ansible into devel
Conflicts:
	docsite/rst/guide_rax.rst
	plugins/callbacks/mail.py
10 years ago
Cristian Ciupitu 72d6e6d805 Remove useless code 10 years ago
Ron Gomes 73246a49dc Fix incorrect argument ordering in error message, which provokes a
printf-related TypeError.
10 years ago
Carlos E. Garcia 4dcaa9d9fb multiple spelling error changes 11 years ago
Michael Scherer cf3365b99e Add a better error message for service
While migrating my playbook to a newer ansible version, I faced
the error message "unknown init system, cannot enable service". It turned
out to be caused by a wrong service name that was not expanded anymore.

So by giving the name of the service that cannot be enabled and a more precise
reason, i think people will be able to diagnose their issue more easily.
11 years ago
Eric Lake 58dccfbc29 Adding bold to service doc to call up state and enabled. 11 years ago
Adam Nielsen b35086c7a3 More descriptive error message if init system is unknown 11 years ago
Michael DeHaan 073d34b40e Merge pull request #6524 from tyll/update_rc_d_disable
service module: Properly disable Debian services
11 years ago
Cristian Ciupitu 7a4270184a Micro-optimization: replace s.find(x)==0 with s.startswith(x)
timeit shows a speedup of ~1.4x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
11 years ago
Till Maas 35f9e62422 service module: Properly disable Debian services
Services on Debian need to be disabled with 'disable' instead of 'remove'
to avoid them being enabled again when 'update-rc.d $service defaults' is run,
e.g. as part of a postinst script.
11 years ago
James Cammarata 9f9c077878 Merge branch 'issues/6341' of https://github.com/threatgrid/ansible into threatgrid-issues/6341 11 years ago
Michael DeHaan cac81b1ad9 Merge pull request #6339 from threatgrid/systemd-template-svc-fix
systemd template services must not discard template part
11 years ago
Michael DeHaan bf33be20e1 Merge pull request #6005 from pgehres/chkconfig
Adding better failure output for chkconfig failures
11 years ago
Cristian Ciupitu 7f681c33a2 Micro-optimization: replace s.find(x)!=-1 with x in s
timeit shows a speedup of ~3x on Python 2.7.5 x86_64.
It also makes the code a bit shorter.
11 years ago
James Tanner fc33860e5d Force command action to not be executed by the shell unless specifically enabled 11 years ago
Charles Duffy 532cda524f #6341: use shared function for parsing systemd status; check rc code 11 years ago
Charles Duffy fd5083fe71 #6341: check systemd service status with show subcommand 11 years ago
Charles Duffy 32620cab4d systemd template services must not discard template part 11 years ago
Peter Gehres a9bf607013 Adding better failure output for chkconfig failures rather than
just saying that the service name is unknown
11 years ago
jctanner 4901af0ef6 Merge pull request #5554 from ttarabul/devel
Use /etc/rc.conf.local for sevice configuration on FreeBSD
11 years ago
Brian Coca fee79e6501 be permissive with BSD with service enabled upper/lower/mixed cases
Signed-off-by: Brian Coca <briancoca+ansible@gmail.com>
11 years ago
Tyler 5ce664b499 keep /usr/local/etc/rc.conf for backwards compatibility 11 years ago
Tyler c073438d40 Use /etc/rc.conf.local for sevice configuration on FreeBSD
/etc/rc.conf.local is the preferred location for system-specific
startup configuration, and /usr/local/etc/rc.conf generally isn’t used.

see:
http://www.freebsd.org/doc/handbook/configtuning-core-configuration.html
11 years ago
Jasper N. Brouwer 9dab01c5e2 Swapped conditions of the changed if statements 11 years ago
Jasper N. Brouwer 677f95294e Fixed false positive on initctl as enable_cmd
Also on update-rc.d
In service module
11 years ago
James Tanner 36c4f05891 Add more error detail to the service module for FreeBSD 11 years ago
Michael DeHaan 0e7069d7c1 Undo an inadvertant revert from template changes so we still allow pythonic imports in module land. 11 years ago
James Tanner 8036e6ee23 Revert templating enhancements from 73dbab70 e6c28658 d409352c 9858b1f2 4587528b 9b1fe455 214b0b05 8d3db803 7f9504d1 5031104c 35cb9dc2 2bd8cb57 1e85c754 11 years ago
Michael DeHaan bc6d454b5e Enable imports to work on a snippet based system, allowing for instance a library of common EC2 functions
to be reused between modules.  See library/system/service and library/system/ping for initial examples.  Can
work the old way to just import 'basic', or can import the new way to import multiple pieces of code from
module_utils/.
11 years ago
James Tanner f27e2fd285 Fixes #4448 reloaded services should be started if not running 11 years ago
Scott Sturdivant 037dcbb4da If the output of rcvar isn't a key=value pair, ignore it. 11 years ago
Michael DeHaan ce8b0944a9 Misc pep8 fixes 11 years ago
Michael DeHaan beae21dd40 Remove examples of module antipattern of setting the choices array for boolean types. 11 years ago
Michael DeHaan c405a61505 Merge pull request #4336 from orkaa/devel
Fixes service update-rc.d functionality on debian
11 years ago
Martijn Lina 3d16b75096 replace dashes in rc.conf keys (which are based on freebsd rc.d filenames) to underscores 11 years ago
Nace Oroz 1f39663a97 Fixes service update-rc.d functionality on debian 11 years ago
cdigiovanni 6720d0cf70 Added support to disable and enable upstart jobs 11 years ago
James Cammarata 3511687dad Minor tweak to service changed logic from the previous commit 11 years ago
James Cammarata 8bdb95a014 Merge branch 'service-enable-fix' of https://github.com/gottwald/ansible into gottwald-service-enable-fix 11 years ago
Petr Svoboda f82d3f7fa9 Fix traceback in service module when svc_cmd is None (2nd fix)
When service module is used on unsupported Linux system where init
script is used directly, LinuxService.svc_cmd is None so .endswith()
fails.

This extends fix from e2f20db534 also
for state=restarted.

Fixes issue #3533
11 years ago