2018-02-20 03:57 AM
I would like to centrally manage nslcd.conf for centralized LDAP authentication for all my NetWitness hosts. Before 11.0 I would have had the competency to do this with Puppet, but with the switch to Chef I no longer know what is needed to accomplish this.
What are the steps required to add a new recipe to Chef to distribute a copy of my nslcd.conf from the NetWitness Server to all core hosts?
2018-04-24 10:06 AM
the command you want to use is salt-cp
salt-cp '*' file.copy /root/hello.txt /root/hello.txt
this copies the file hello.txt from /root/hello.txt on Node0 (head) to all the other nodes.
when run it looks like this
600cf230-e592-4fd3-b669-9fa13c232d54:
----------
/root/hello.txt:
True
79cbb57e-a47f-4b05-82a8-509ed7cadfea:
----------
/root/hello.txt:
True
b7498e33-89de-4a51-b142-fb28e7b55fa6:
----------
/root/hello.txt:
True
if you wanted to see what those ID were in terms of system hostname you could do the following
salt '*' cmd.run 'hostname ; echo' 2>&-
which gives you
cf714e65-98ee-4596-ba61-39dd18f65c7b:
nw11endpoint
fddf1b5c-dece-4d75-8ead-69fffae408b1:
nw11head
79cbb57e-a47f-4b05-82a8-509ed7cadfea:
nw11pdecoder
or install a package on all nodes
salt '*' pkg.install man