Adding node for directory not working

39 views
Skip to first unread message

Emmanuel Claude

unread,
Aug 8, 2022, 9:36:05 AM8/8/22
to rundeck-discuss
Hello,

I'm a newbie using Rundeck. I don't know it's a use intended by the tool but I would like to add nodes for each website on my local server. For example le répertoire /var/www/html/site1 would correspond to a "site1" node on Rundeck. This would allow me to run recurring commands while already being correctly located in my site folder, without executing cd multiple times and, at the end, create somes automatizes for each of my websites projects.

To achieve this I added a "Directory" source indicating the folder of my site (cf. screen), in which I put a resource.xml file containing the following lines:
                                                                                       
<project>
<node name="site1"
    hostname="localhost"
    username="rundeck"
    environment="development"
    />
</project>

By doing this, my "site1" shows up well as a node. On the other hand, when I want to perform a command in this node, that's when it doesn't work.

When I execute the "ls" command in my "site1" node, the command does not display the files and directories of my "site1" folder, but those placed at the root of my server ( / )

I am using Rundeck version 4.4.0.

Could you help me please ?

Thanks in advance !
Capture d’écran 2022-08-06 à 11.53.35.png

rac...@rundeck.com

unread,
Aug 8, 2022, 10:09:29 AM8/8/22
to rundeck-discuss
Hello!

To dispatch local commands, you don't need to add an extra server, just make sure to have the local entry in your Project's nodes list and select the localhost in your node filter (Commands page), but if you want to dispatch commands to remote servers, you need to add the authentication attributes to connect to remote servers via SSH, please take a look at this and this step-by-step guide.

So, if you want to dispatch commands to the local node, just use the local model source :-)

Hope it helps!
Reply all
Reply to author
Forward
0 new messages