And again I have a non-typical use case.
How would you approach such task? I have some servers on which there is
a piece of software running that's not configured by me and thus I can't
control the configuration with ansible. But I need to be able to make
sure that for every entry in its configuration I make sure that
something is done on the host.
For example (this is not this case; just for explanation what I mean) -
someone else is responsible for creating users on the machine (or the
users are created remotely and authenticated and authorized using
pam_ldap and nss_ldap for example) and I can list them with gentent. I
need to make sure that for each user I have a directory created on a host.
That would involve running a command on the remote host side (in our
case - getent) to get an output, and then iterating over this output to
make sure the directories are created.
Of course I could just do a remote command and do a script to be run on
the remote side but it kinda defeats the purpose of having ansible in
the first place.
Any better ideas?
Hmm... maybe doing a remote command, registering output and then looping
a task over it? I'm not sure though how to split the result that I
register in a variable into single lines.
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/7ff0fc7e-373c-b31d-bd5a-4ca935699939%40gmail.com.