24 votes
Accepted

How to test provisioning and configuration in Ansible setup?

Some options out there.. Testing tools: Sorted by github stars Serverspec - Ruby, most popular tool out there, built on ruby's rspec Goss - YAML, simple, <10MB self-contained binary, extremely ...
user avatar
13 votes

How should I store my environment variables?

I've had two runs at doing environment variables in a scalable way and neither has ended up perfect because, as I've discovered, is a very tricky thing to get right. I'll give a summary of both of my ...
user avatar
  • 1,634
12 votes

How to test provisioning and configuration in Ansible setup?

The two tools I've seen for this are InSpec and ServerSpec. Serverspec is a Ruby-based tool that builds on RSpec. InSpec is inspired by RSpec and ServerSpec. I've used ServerSpec. It's cool, but ...
user avatar
  • 3,973
11 votes

How to test provisioning and configuration in Ansible setup?

When using configuration management tools, such as Ansible, the tool itself would be responsible preventing configuration drift. Once you used Ansible to set a certain configuration, repetitive ...
user avatar
11 votes
Accepted

What are possible implementations (or examples) of the four-eyes principle?

One of the implementation on code is the Pull Request model (PR) popularized by GitHub. The main reasoning behind is that only a small set of maintainers of the product will be allowed to merge code ...
user avatar
  • 11.1k
9 votes

What are possible implementations (or examples) of the four-eyes principle?

Code Reviews This is about having at least 1 other person look at the code written by somebody, eg to evaluate if it meets some predefined criteria like: Coding standards (indentations, etc). Inline ...
user avatar
  • 6,963
8 votes
Accepted

How to implement the four-eyes principle for emergency fixes?

In the SCM-world where I'm mostly familiar with, the above scenario is typically addressed by what's called the "abbreviated-approval list procedure. Here is a blueprint of it: Define your business ...
user avatar
  • 6,963
7 votes

Assertions and constraints

In Ansible: you can use assert or fail module. - name: "Make sure web_sites is dictionary" fail: msg="web_sites should be dictionary" when: web_sites is not dict - name: "cluster_name should ...
user avatar
6 votes

What are possible implementations (or examples) of the four-eyes principle?

These are strategies/patterns I can think of: Separation of Duty DevOps, to my view at least, does not means embodying of both dev and ops in a single person. So it is still possible to separate the ...
user avatar
  • 331
6 votes

How to test provisioning and configuration in Ansible setup?

Test Kitchen has a kitchen-ansible provisioner plugin for testing of Ansible code. It isn't as deep as the Chef integration but it does get the job done for most cases. There is also the more recent ...
user avatar
  • 1,197
6 votes

Where should I put my application configuration?

Who said that properties files and environment variables where mutually exclusive? There is a distinction to be made between "where do I store my app configuration?" And "where does my app source it'...
user avatar
  • 1,634
6 votes

Tool for storing per environment configuration

There are many tools that can do something like this, including configuration management tools like Chef, Ansible, or Puppet; and KVS tools like Consul and etcd. You could also integrate it as a build ...
user avatar
  • 773
5 votes
Accepted

Bad edit to sudoers file on EC2 instance, how to fix it?

How about user-data ? I believe adding the "#cloud-boothook" allow to force the user-data to run at every restart. #cloud-boothook #!/bin/bash echo 'test' > /home/ec2-user/user-script-output.txt ...
user avatar
  • 66
5 votes

How to automate initial server configuration?

What you are trying to accomplish is referred to as infrastructure as code. Which tools you select will depend on where you are operating, and what your business needs are. If you are operating in ...
user avatar
4 votes

Bad edit to sudoers file on EC2 instance, how to fix it?

Generally recovering from this sort of mistake involves editing the boot loader to force a root shell. Since you don't have physical access to the (non-physical) machine, things are a bit different. ...
user avatar
4 votes

How to implement a frozen test environment?

TeamCity has a Shared Resources build feature which allows you to define a resource which multiple Build Definitions depend upon it. Build Definitions can either require a Read Lock or a Write Lock, ...
user avatar
4 votes

Can GitHub's Pull Request model be used for implementing post approvals?

Yes, I do believe so. To explain that I need to lay some groundwork on how I have implemented something similar, I have simplified the model in an attempt to make it as clear as possible. ...
user avatar
4 votes
Accepted

How can I validate GoCD configuration before applying it

The best solution we found so far, is using the MagicalGoConfigXmlLoader interface from the go source code, as it calls an internal validateCruiseConfig command, that does all validations, or die if ...
user avatar
  • 1,557
4 votes

Unable to parse YAML: mapping values are not allowed here

You simply have an incorrect yaml syntax in your workflows jobs list. From what I could very quickly understand on circleCI's documentation, jobs names are accepted as a shorthand if you don't define ...
user avatar
4 votes
Accepted

Unable to parse YAML: mapping values are not allowed here

Running your config.yml through yamllint, produced the following: 1:1 warning missing document start "---" (document-start) 13:3 error duplication of key "build" in mapping (key-...
user avatar
  • 835
3 votes

How to implement the four-eyes principle for emergency fixes?

In the case of off-hours emergency fixes, it's more practical to require less sign-off for changes than your normal procedure. Generally, you can deploy a fix and then do post-approvals the next ...
user avatar
  • 650
3 votes
Accepted

How to implement a frozen test environment?

My answer in the context of the question is a very expensive test environment (like mainframes or very large telecom equipment, for example) which are expected to be shared by multiple users for ...
user avatar
3 votes

How should I store my environment variables?

If your environments are per customer, I would suggest in your specific case to have a repository per customer. (In general it is repository per environment.) This repository would have a standard ...
user avatar
  • 5,627
3 votes
Accepted

Where is the apache2 filebeat module configured?

After looking a bit further, I found it in the sample called filebeat.full.yml So I added this section to the filebeat.yml Restarted filebeat After running at 100% CPU for minute, Kibana is now ...
user avatar
  • 229
3 votes

Kubernetes API Server KUBE_SERVICE_ADDRESSES parameter and Pod Network configuration

https://kubernetes.io/docs/getting-started-guides/centos/centos_manual_config/ # Address range to use for services KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"
user avatar
  • 12.6k
3 votes

Ensure a line is uncommented in an XML file using ansible

As mentioned in the question and the comments on it, this isn't an area in which Ansible excels. The "best" solution depends a bit on the type of file you're dealing with, and the structure of it. ...
user avatar
3 votes
Accepted

What are Pros and Cons of various VCS and CI/CD tools to store, change and deploy configuration snippets of more than 1000 customers in a VCS?

Personally I'd keep them in separate repositories, for clear customer isolation: minimal/no risk of unwanted interference between customers different access control for different customers is ...
user avatar
3 votes

Where are dunder dictionaries stored in salt?

There are currently 5 dunder dictionaries. They are available at runtime and generally not stored statically. __opts__ - Master or Minion configuration options; stored in configuration files of ...
user avatar
  • 66
3 votes
Accepted

Error passing arguments to ansible playbook

I'd suggest that you first put some default values within the playbook (if you explicitly want your variables there, for the purpose of .. reducing interactivity/command line args lets say): - hosts: ...
user avatar
  • 749
3 votes
Accepted

No Kubernetes Option in Docker Desktop for Windows

You need to first switch to Edge version by going to the Docker -> Settings -> General tab. Then, you have to enable the kubernetes. Open Docker for Windows settings by accessing your system ...
user avatar
  • 951

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