Ansible on gentoo linux, with both systemd and openrc installed

78 views
Skip to first unread message

Stefan Weichinger

unread,
Jan 21, 2015, 3:37:04 PM1/21/15
to ansible...@googlegroups.com

This is my first posting here, so pls be kind ;-)

I learn my first steps with ansible for some weeks now and get some issues with the service-module.

As some of you may know, on gentoo linux it is rather common these days to have both systemd and openrc installed at the same time.
systemd as active init-system, and openrc as the "gentoo-default" that is kept there just as a fallback.

So the binaries and tools of both $PS1-systems are installed while only one (in my case systemd) is active and running.

Now when I write a task in ansible that should ensure that service chronyd is running I get back messages that seem openrc-based and not systemd-based.

I discussed these issues on the gentoo-users-ml already:


(I simply quote the link to open a discussion ... I am ready to provide any additional infos if needed)

Maybe this is a case not yet fully considered in the service-module?

I'd be happy to get some pointers or help in here, thanks a lot ...

Stefan

Brian Coca

unread,
Jan 21, 2015, 3:39:45 PM1/21/15
to ansible...@googlegroups.com
check with gentoo devel, fixes to system detection were added as more
and more distros run in 'mixed mode'.



--
Brian Coca

Brian Coca

unread,
Jan 21, 2015, 3:40:34 PM1/21/15
to ansible...@googlegroups.com
sorry, ansible's devel branch ... not gentoo devel.
--
Brian Coca

Stefan Weichinger

unread,
Jan 21, 2015, 3:51:13 PM1/21/15
to ansible...@googlegroups.com
oops, groups runs TOFU?


Am Mittwoch, 21. Januar 2015 21:40:34 UTC+1 schrieb Brian Coca:
sorry, ansible's devel branch ... not gentoo devel.

On Wed, Jan 21, 2015 at 3:39 PM, Brian Coca <bc...@ansible.com> wrote:
> check with gentoo devel, fixes to system detection were added as more
> and more distros run in 'mixed mode'.


So you suggest to install the latest git-based release on my "management host", right?
Thanks, will test asap ;-)

Stefan  

Stefan Weichinger

unread,
Jan 21, 2015, 3:58:50 PM1/21/15
to ansible...@googlegroups.com
yep, works:

# ansible -i inventories/oops_nodes.yml  -l hiro.local -m service -a  "name=chronyd state=started" all
hiro.local | success >> {
    "changed": false,
    "name": "chronyd",
    "state": "started"
}

curious for the diffs now ;-) 

Brian Coca

unread,
Jan 21, 2015, 4:58:47 PM1/21/15
to ansible...@googlegroups.com
the relevant changes are in the service module




--
Brian Coca
Reply all
Reply to author
Forward
0 new messages