Posts Tagged ‘devops’

“could not open session” error in docker container

I received the following error, attempting to cat a log file, inside a docker contain when troubleshooting another issue… TASK [setup_cassandra : shell] ************************************************* changed: [testhost] => {“changed”: true, “cmd”: “cat /var/log/cassandra/*”, “delta”: “0:00:00.004140”, “end”: “2019-03-16 18:48:28.684133”, “rc”: 0, “start”: “2019-03-16 18:48:28.679993”, “stderr”: “”, “stderr_lines”: [], “stdout”: “could not open session”, “stdout_lines”: [“could not open […]

Vagrant: Create a series of VMs from a hostname array

I couldn’t find any examples of creating VMs from a array of strings online so sat down to work something out myself. Here’s how you do it… Vagrant.configure(“2”) do |config| [ “web1”, “db1”, “web2”, “db2”, “backup1”, “backup2”, “admin1” ].each do |host| config.vm.define “#{host}” do |nrpe| nrpe.vm.box = “bento/centos-7.5” nrpe.vm.provider :virtualbox do |vb| vb.customize [ “modifyvm”, […]