Download file on computer From Rundeck - rundeck

Is it possible to download a file from a server through a script Rundeck on my personnal computer ?
Regards,
Frédéric

First scenario. The Rundeck server is running on your machine: just using a script with curl / wget to download the file locally (using a local path).
Second scenario. The Rundeck server isn't on your computer: just set up an HTTP/bucket server, and print the download link in the Rundeck job output.

Related

Permission issue while executing an ssh task in azure pipeline

What I am trying to do is to run a few lines of shell script in a remote machine via an azure pipeline. I used the ssh Deployment Task to accomplish this. I have used the script path argument to point the .sh file that contains the script that should be ran. The ssh task was able to connect to the remote host, but the following permission error pops up.
Can someone tell me what's going wrong here. The .sh file that i am using was created in the Linux box itself and has got the permission level set to 777 before moving to the repo.
There is an another CopyFilesOverSSH#0 task in the pipeline in the same stage which works perfectly without any permission issues for the same user.
2021-12-31T12:41:42.1763039Z ##[section]Starting: SSH
2021-12-31T12:41:42.1894277Z ==============================================================================
2021-12-31T12:41:42.1894676Z Task : SSH
2021-12-31T12:41:42.1895010Z Description : Run shell commands or a script on a remote machine using SSH
2021-12-31T12:41:42.1895347Z Version : 0.189.0
2021-12-31T12:41:42.1895637Z Author : Microsoft Corporation
2021-12-31T12:41:42.1896023Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/deploy/ssh
2021-12-31T12:41:42.1896437Z ==============================================================================
2021-12-31T12:41:42.8200834Z Trying to establish an SSH connection to ***#80.xxx.xxx.xxx:22
2021-12-31T12:41:43.1333018Z Successfully connected.
2021-12-31T12:41:43.5698433Z ##[error]Failed to copy script to remote machine. Error: Error: put: Permission denied //checkFileAvailability.sh.
2021-12-31T12:41:43.6050230Z ##[section]Finishing: SSH
Firstly, if you want to copy files to the remote machine, then it's recommend to use Copy Files Over SSH task. This task allows you to connect to a remote machine using SSH and copy files matching a set of minimatch patterns from specified source folder to target folder on the remote machine. Supported protocols for file transfer are SFTP and SCP via SFTP.
For the SSH Deployment task. This task enables you to connect to a remote machine using SSH and run commands or a script.
According to your error message, the SSH is successfully connected, but failed to copy script to the remote machine. It appears that the service account doesn't have the permission to copy the specified file to the specific path on the remote machine. Please check your source file path permission settings. Please also try to using inline script instead of the Script File to check if it works.
I had the same issue when run SSH script task under a user which was not a root. So for inline script to run under different user, that user should have:
Read/Write/Execute access to root folder, as TFS put all commands into generated bash script file and copy it to target machine root folder (below is another command, which is executed on already copied script file)
tr -d '\015' <./sshscript_099d4e8c-44ac-482d-b1bf-84a52c7ab810> ./sshscript_099d4e8c-44ac-482d-b1bf-84a52c7ab810._unix
User should have home directory as TFS switch to it
So to fix this issue I have granted rwx permissions to everyone for the root folder
chmod 777 /
ls -ld /
drwxrwxrwx 20 root root 4096 Feb 10 14:54 /
And make sure that home folder for my user exists

Rundeck - Execute ansible playbook on a remote ansible server

New in Rundeck
What i'm trying to achieve with rundeck is the following -
to let a windows user connect rundeck and execute predefined ansible playbooks that are located on a remote ansible server. Doing this will not require the user to connect the ansible server (i dont need to share password) and only approved user that can login to rundeck can run the scripts
Is it possible to install Rundeck on a windows machine and execute ansible scripts that are located on a remote ansible server?
Can i see the playbook output on rundeck UI?
If not, should I run rundeck on the local ansible server?
Can i have all the above using the community Rundeck version ?
By design Rundeck and Ansible must coexist in the same server to use the Ansible plugin but, you can dispatch Ansible commands (ansible-playbook) on remote servers using the command step.

Installing agents on solaris remotely

In regard to Uptime.
I want to install the agents on solaris machine remotely through putty.
Now for that, I have established(logged in) a connection to that system successfully.
following this, my next step would be to "Using a file transfer method such as FTP, transfer the archive containing the Agent to the system on which you want to install it. You should copy the archive to a temporary directory on the system."
Now my problem is that i am unable to transfer the archive containing the agent, to the system on which i logged in through putty.
I have searched this command to transfer the files rcp machinename:source destination
here my machine name is:
\uptime-share.uptimesoftware.com\css\Releases\Agents\Solaris
source : uptimeagent-7.2.1-solaris-sparc
destination : 172.20.98.14/tmp
but after using this command i get the message connection refused.
Could someone help me to do this.
I used this command
rcp 172.20.32.11:/css/Releases/Agents/Solaris:uptimeagent-7.2.1-solaris-sparc 172.20.98.14/tmp

JasperReports Server Installation fails while executing initdb.exe of postgresql

JasperReports Server 5.6.0
I am able to successfully install JasperReports Server in unattended mode, when login to a specific machine as local Administrator. But I want to do the installation from a remote machine and am passing the same parameters as earlier(invoking the setup using CPAU for run as admin), but it fails while executing initdb.exe with the data folder creation.
I am getting the following error message as stated below.
"Executing initdb.exe -U postgres -E UTF8 -D C:/JASPER~1/JASPER~1.6/POSTGR~1/data
Script exit code: unknown signal
Script output:
Script stderr: child killed: unknown signal"
After googling and looking for a possible solution, I tried the following.
1) Created the data folder via cmd and provided full control permissions using cacls
2) Created the parent folder 'JasperServer' and provided inheritance permissions of OI, CI, Full Control.
But the issue appears to be the same. Though I am able to install JR Server with the same account by rdp in to the specific machine.
Can anyone help me out?
pls try this:
http://community.jaspersoft.com/wiki/bundled-installer-fails-error-running-initdbexe
Reason: You are using domain admin account.
Solution:
change to local admin user and restart install procedure,then it works:-)
By, Kosta

Cruisecontrol.net to deploy msi

Is it possible to deploy an MSI to remote server and run database script on sql server using CruiseControl.net? I am new to CruiseControl.Net and looking for an example.
I tried the below wiki page but deployment page is under construction:
http://www.cruisecontrolnet.org/projects/ccnet/wiki/Configuration
You can have CruiseControl.net call either PowerShell or Batch file. More info on the CruiseControl.net config to call PowerShell or Batch file can be found here.
From the PowerShell or Batch file you can use PSExec to install MSI file for a remote server. As for running database scripts on remote server you can use SqlCmd .