Questions tagged [automation]

the field of converting any manual process into one that can be run mostly, or entirely, "hands-free"

Automation is a wide-ranging term, covering topics from cron to "push-button provisioning and deployment" or system and application stacks. The ultimate goal of some automation projects is the so-called "Zero-Latency Data Center", while for others it may just be sending alerts based on certain events. More information can be found here.

623 questions
676
votes
10 answers

How to automate SSH login with password?

How to automate SSH login with password? I'm configuring my test VM, so heavy security is not considered. SSH chosen for acceptable security with minimal configuration. ex) echo password | ssh id@server This doesn't work. I remember I did this with…
Eonil
  • 9,689
  • 15
  • 34
  • 53
77
votes
3 answers

Automate the installation of postfix on Ubuntu

My system configuration script does an "apt-get install -y postfix". Unfortunately the script is halted when the postfix installer displays a configuration screen. Is there a method to force postfix to use the defaults during installation so that…
sutch
  • 956
  • 1
  • 7
  • 9
37
votes
6 answers

Ssh, run a command on login, and then Stay Logged In?

I tried this with expect, but it didn't work: it closed the connection at the end. Can we run a script via ssh which will log into remote machines, run a command, and not disconnect? So ssh in a machine, cd to such and such a directory, and then run…
jonathan
  • 371
  • 1
  • 3
  • 3
32
votes
8 answers

Ansible: Conditionally define variables in vars file if a certain condition is met

Depending on the value(True/False) of a variable defined into the group_vars I am trying to define some variables in a vars file. Their value depends on the group var's value. My current var file looks like this: {% if my_group_var %} test: var1:…
pandoJohn
  • 375
  • 1
  • 4
  • 8
32
votes
4 answers

How do I run my PowerShell scripts in parallel without using Jobs?

If I have a script that I need to run against multiple computers, or with multiple different arguments, how can I execute it in parallel, without having to incur the overhead of spawning a new PSJob with Start-Job? As an example, I want to re-sync…
Mathias R. Jessen
  • 24,907
  • 4
  • 62
  • 95
32
votes
6 answers

Automatically Configure New Computers

My company is in the process of upgrading all of our users from old Windows XP computers to newer quad-core Win7 computers. This is a good thing - it's long overdue that we upgrade our workstations - but I now spend a ton of time configuring new…
jwegner
  • 493
  • 5
  • 10
30
votes
5 answers

How can a Linux Administrator improve their shell scripting and automation skills?

In my organization, I work with a group of NOC staff, budding junior engineers and a handful of senior engineers; all with a focus on Linux. One interesting step in the way the company grows talent is that there's a path from the NOC to the senior…
ewwhite
  • 194,921
  • 91
  • 434
  • 799
27
votes
7 answers

Automating server deployment

I find i am constantly settings up pretty much nearly identical servers and VPSs for a number of my clients and it can be very time consuming. Often the only thing that changes between each deployment is the different website that is to be served.…
Josh Hunt
  • 570
  • 8
  • 12
24
votes
7 answers

git clone - fail instead of prompting for credentials

When cloning git repositories in automated tools - web front ends, CI systems, sometimes the git clone invocation opens up a prompt asking for the username and password (for example, when cloning a non-existent Github repo or on a new node missing…
Tin Tvrtković
  • 343
  • 1
  • 2
  • 4
23
votes
3 answers

Putting RSA keys into azure key vault

How can I store my key pair (typically the id_rsa and id_rsa.pub) in azure key vault. I want to put the public key in my GIT service and allow a virtual machine to download the private key from Azure key vault -> So that it can access GIT…
MercilessMaverick
  • 387
  • 1
  • 2
  • 7
22
votes
6 answers

Alter charset and collation in all columns in all tables in MySQL

I need to execute these statements in all tables for all columns. alter table table_name charset=utf8; alter table table_name alter column column_name charset=utf8; Is it possible to automate this in any way inside MySQL? I would prefer to avoid…
The Disintegrator
  • 585
  • 2
  • 6
  • 19
20
votes
1 answer

How can I prepend to PATH while running Ansible's pip module?

I'm attempting to install psycopg2 into a Python virtualenv with Ansible's pip module, but I need to prepend an entry to PATH for it to build correctly (it needs to know the path to the directory containing pg_config). I see that I can pass…
Collin Allen
  • 574
  • 1
  • 7
  • 16
20
votes
7 answers

Cygwin SSHd Autoblock Failed Logins

I'm running Cygwin with an SSH deamon on a Windows Server 2008 machine. I was looking at the Event Viewer and noticed as much as 5 to 6 failed login attempts per second (brute force) for the last week or so, from different IPs. How can I autoblock…
ANaimi
  • 309
  • 1
  • 2
  • 6
19
votes
6 answers

Adding a user to the local Administrator group using powershell

I would like to use PowerShell to add a specific user to the local administrator group on a machine. I would be running the PowerShell script in the context of a user that has Administration rights on the local machine.
Rihan Meij
  • 547
  • 1
  • 4
  • 10
18
votes
9 answers

How to set ulimits for a service starting at boot?

I need, for mysql to use large-pages, to set a ulimit - I've done this in limits.conf. However, limits.conf (pam_limits.so), doesn't get read in for init, only for "real" shells. I solved this before by adding a "ulimit -l" to the initscript start…
jayofdoom
  • 191
  • 1
  • 1
  • 4
1
2 3
41 42