Hot answers tagged

9 votes
Accepted

How to run a single one-time command on a kubernetes instance/pod

A little more information is needed about specific operations you are doing, but generally your options are: For one-time operations: use kubectl exec to get into containers and do commands (works ...
taleodor's user avatar
  • 867
5 votes

Git keeps asking for ssh passphrase when SSH is already defined in GitLab

You can try adding your passphrase to the keychain using ssh-add -K, this will ask you the passphrase for the first time and later on it won't ask.
AV Reddy's user avatar
5 votes
Accepted

How to SSH from Jenkins node to Jenkins node safely?

Yes, storing your ssh keys directly on a build node is a bad practice. Nodes can be replicated, deleted, or given access to from other systems, and you don't want to lose track of what systems have ...
Preston Martin's user avatar
  • 3,248
4 votes

Using SSH to open interactive session in ansible

You could try ansinble-console It mostly feels like you just have a shell open, unless you use and ansible task name as your command, in which case prefixing it with shell <whatever you wanted to ...
hvindin's user avatar
  • 1,734
3 votes

Cloud-Init Script Won't Run?

There are a few issues with this cloud-init script. #groups is commented out, so the list beneath it makes it invalid YAML. Even if we uncomment groups, - ubuntu: [root,sys] is invalid because the ...
falcojr's user avatar
  • 141
3 votes

Using SSH to open interactive session in ansible

I recently made myself a small script that seems to do the work. It certainly can be done better but maybe you can get some inspiration: #!/bin/bash set -e if [ -z "$1" ] then echo &...
Aleksander Lech's user avatar
3 votes
Accepted

Vault `SSH-CA` Elliptic Curve rather than `RSA`

I think the answer should be yes to ecdsa but no to ed25519, but that it is currently no to both. You can externally generate an ecdsa keypair and load it into ssh/config/ca but vault-1.4.3 cannot ...
Jon Diprose's user avatar
2 votes

Running Automation on Google Cloud Virtual Instances using Ansible

You run the command with the user shishir9159_gmail_com but the error shows [email protected]: Permission denied ... seems like the _gmail_com portion of the username is truncated. Can you try ...
Jorn's user avatar
  • 21
2 votes
Accepted

Automatically write new bash history to change-log file

Try using GNU Screen or Tmux. These are called "screen multiplexers" but you'd get a number of benefits The commands you run will continue running even if you disconnect, or you have network related ...
hayalci's user avatar
  • 136
2 votes

network ansible command error: "msg": "network os centos is not supported"

This error is due to invalid value of ansible_network_os: The playbook you try setup is meant for network devices. And since centos is not a network device OS the playbook will fail. Here you can find ...
akane's user avatar
  • 163
2 votes

Using SSH to open interactive session in ansible

Here is my solution, which processes variables that Ansible uses to connect hosts, specifically ansible_ssh_common_args, and generates an SSH configuration file and wrapper shell scripts that they use....
Dmitri Rubinstein's user avatar
2 votes

Ansible no user $HOME by default - so how do I run commands

I assume that you are referring to verbose output similar like TASK [Task] ***************************************************************************************************************** task path: ...
U880D's user avatar
  • 377
1 vote

Ansible Connecting to remote Docker container over SSH

I have found a hacky workaround for my problem. I replicated the behavior of the community.postgresql.* modules that I want to use in a bash script and execute it using the community.docker....
Tiim's user avatar
  • 11
1 vote

Is there a way to exclusively manage multiple ssh keys with differing per-key options using ansible?

The #ansible IRC channel noted that key options can be included in the multiline key field. When doing so, key_options can be left unset and things work. Having to construct this multiline key field ...
Helmut Grohne's user avatar
1 vote

Is there a way to exclusively manage multiple ssh keys with differing per-key options using ansible?

One approach would be to use multiple authorized keys files, authorized_keys2 is deprecated but there's no reason you can't use it and you can specify multiple authorized keys files in sshd config ...
Peter Turner's user avatar
  • 1,441
1 vote

Git keeps asking for ssh passphrase when SSH is already defined in GitLab

Passphrase is defined by the way you created your private key. When creating a key pair you need to opt for no passphrase on the private key - this should solve your issue.
taleodor's user avatar
  • 867
1 vote
Accepted

Root ssh key for ansible control node

There are pros and cons for both options: A single master key for your Ansible account would reduce complexity but you would need to ensure the private key is very secure, even if the key were ...
Josh Zhang's user avatar
  • 150
1 vote

Setting up CircleCI to AWS EC2 for a simple node application deployment

I would look at AWS System Manager to do this instead of direct ssh. Create a SSM document to run the commands you want to run, then this can be invoked by an AWS cli command from your CI/CD pipeline....
Alastair Montgomery's user avatar
1 vote

ansible playbook cannot apply, giving host unreachable error

Do the following for each Vagrant machine you want Ansible to work with...in this example, using the machine master1: Do vagrant ssh-config > vagrant-ssh Enter content from vagrant-ssh into your ~/...
mikequentel's user avatar
1 vote

Minikube for Ubuntu 20.04 WSL stuck on 'Restarting existing docker container for "minikube" ...' after minikube start and 'StartHost failed' error

Not sure if complete reinstall is a valid option for you, but for me this helped: sudo minikube delete After delete is finished, minikube start again
Jussi A's user avatar
  • 11
1 vote
Accepted

How to get the IDs of Docker Containers that belong to a Service, given the Service name or id

As a little addition to such extensive answer, with docker ps you can --filter containers by label. One of the labels in swarm is a service name, so: docker ps --filter "label=com.docker.swarm....
anemyte's user avatar
  • 223
1 vote

How to get the IDs of Docker Containers that belong to a Service, given the Service name or id

Answering my own question & accepting it because it works - this is the solution: Step 1: So I start by finding the Docker Service I recognise as my Drupal site "that's the site" node1 $ ...
therobyouknow's user avatar
1 vote

Download an artifact from Nexus to Jenkins

Create String parameter artifactID, Password parameter NexusUser with username and Password parameter NexusPassword with nexus password. curl -v -u $NexusUser:$NexusPassword -o ~/tmp_dl/distr.zip ...
Stepan's user avatar
  • 131
1 vote

Download an artifact from Nexus to Jenkins

There are a few ways to do this, but by far the easiest is to put your credentials (either username/password or ssh keypair) into the Jenkins built-in credentials store and then use the sshagent step ...
jayhendren's user avatar
  • 2,952
1 vote

Why can't I connect to Gitea using ssh via command line?

OK, there seems to be two problems here. SSH hanging after connection It's probably a problem on the client tty due to limitations of MinGW. In the past I've encountered that ssh was unable to ioctl ...
Guillermo Prandi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible