IRC chat logs for #ltsp on irc.libera.chat (webchat)


Channel log from 28 September 2019   (all times are UTC)

00:14vagrantc has left IRC (vagrantc!~vagrant@unaffiliated/vagrantc, Quit: leaving)
02:08ZAJDAN has left IRC (ZAJDAN!~zdenek@77.48.149.75, Ping timeout: 245 seconds)
02:43book` has joined IRC (book`!~book`@static.38.6.217.95.clients.your-server.de)
02:43book`_ has left IRC (book`_!~book`@static.38.6.217.95.clients.your-server.de, Ping timeout: 265 seconds)
04:42adrianor1 has joined IRC (adrianor1!~adrianorg@189.58.183.245.dynamic.adsl.gvt.net.br)
04:45adrianorg has left IRC (adrianorg!~adrianorg@177.18.180.82, Ping timeout: 268 seconds)
05:00kjackal has left IRC (kjackal!~quassel@athedsl-4546118.home.otenet.gr, Ping timeout: 240 seconds)
05:33woernie has joined IRC (woernie!~werner@p57A0EE73.dip0.t-ipconnect.de)
06:14
<alkisg>
uumas, my scripts are idempotent too, so that part doesn't worry me. But here's a more in-depth question: suppose that my script wants to restart the ssh service, which in debian is called `systemctl restart openssh-server` and in fedora is called `systemctl restart sshd`.
06:14
This isn't a real example, it's a fictional one, I don't know if they indeed have different names.
06:14
So, in my script, I'd have to check which of these services exist, to restart the appropriate one
06:14
How does ansible users cope with that? Does it have "common names for all services", or you still have to write distro-specific code?
06:20kjackal has joined IRC (kjackal!~quassel@2a02:587:3107:2e00:e987:af3f:69ef:3a49)
06:25ZAJDAN has joined IRC (ZAJDAN!~zdenek@77.48.149.75)
06:36ricotz has joined IRC (ricotz!~ricotz@ubuntu/member/ricotz)
07:29kjackal has left IRC (kjackal!~quassel@2a02:587:3107:2e00:e987:af3f:69ef:3a49, Ping timeout: 276 seconds)
09:08statler has joined IRC (statler!~Georg@p54897245.dip0.t-ipconnect.de)
09:16
<uumas>
alkisg: You can have distro-specific variables in your role's `vars` directory. Then you can load the correct ones. Here's an example: https://github.com/freeipa/ansible-freeipa/blob/master/roles/ipaclient/tasks/main.yml
09:18
For a simpler example, you could just do include_vars: "{{ ansible_distribution }}"
09:23
<meo>
alkisg: generally speaking ansible has abstractions for this kind of thing, and you feed them with overrides. Very often though roles target a specific distro subset (e.g. debian based) where this is a non-issue
09:24
I do not like some aspects of ansible's design but in practice it's a great tool
09:26
<alkisg>
Well if *I* am going to write the distro-specific code anyway, I don't see where ansible helps...
09:26
It doesn't make my code smaller, it just makes me read a whole new way to do my self the things again
09:32
<meo>
alkisg: it operates on a higher level of abstraction and is specifically designed to manipulate remote hosts
09:33
essentially it compiles and uploads python scripts and executes them on the remote
09:34
it is not perfectly idempotent nor can it acquire existing state of the machine like puppet can but for system administration it is certainly great
10:18kjackal has joined IRC (kjackal!~quassel@2a02:587:3107:2e00:e987:af3f:69ef:3a49)
14:11kjackal has left IRC (kjackal!~quassel@2a02:587:3107:2e00:e987:af3f:69ef:3a49, Ping timeout: 276 seconds)
18:57woernie has left IRC (woernie!~werner@p57A0EE73.dip0.t-ipconnect.de, Remote host closed the connection)
20:27statler has left IRC (statler!~Georg@p54897245.dip0.t-ipconnect.de, Remote host closed the connection)
21:08vagrantc has joined IRC (vagrantc!~vagrant@unaffiliated/vagrantc)
21:37ricotz has left IRC (ricotz!~ricotz@ubuntu/member/ricotz, Quit: Leaving)