Hot answers tagged

3

Generally, Ansible is very flexible and often there are more "correct" solutions. Start for example with the question "Where do the configuration data come from?", put the default data to the roles and decide which variables should be configured in "group_vars/host_vars", in the roles, and which in the playbooks. Review Variable precedence: Where should I ...


2

A bit late here, but no, you can't have multiple gitlab-ci files per repository. You can see more information in the following links : https://gitlab.com/gitlab-org/gitlab-ce/issues/18157 https://gitlab.com/gitlab-org/gitlab-ce/issues/28592 Now, there are some work in progress about this, but it's not available yet. For example, you can see here ( https://...


2

There is only one YAML spec. That would lead me to say "There are no YAML dialects". There are certainly differences in implementation, perhaps due to what the article claims as the spec's ambiguity: YAML specification is so ambiguous, It's a matter of opinion, I believe, but there is no doubting that various language-specific parsers of the same data ...


2

According to the yamllint documentation you need to add a special comment to the line -- <string-to-be-excluded> # yamllint disable-line rule:line-length --- #defaults/main firefox_checksum: sha512:49d776cfb5f42c6e5ea1a55a80d9f6bad223080b16baa0d39de63534c25e68340091b4e16be5355d565f81291cb94fb996f03ae7e3e4c7a28021b0a0929daf58 #yamllint disable-line ...


2

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: all vars: user: greatuser passa: greatpassword Second, I'm pretty sure that pass is a reserved word somewhere, although I'm failing to find it in ...


2

Surprisingly indeed GitLab works weirdly with the env vars. It evaluates them internally, though it shouldn't in my view. Value set as (in project Settings > CI/CD > Variables): 'aaa$bbb*%' becomes 'aaa*%' (with single quotes left!) Couple of of proof links: https://gitlab.com/gitlab-org/gitlab-ce/issues/45173#note_101659865 https://gitlab.com/gitlab-org/...


2

This slide share gives an idea how to handle CasC in Bamboo. The presenter advocates to use yaml, but according to him there are also downsides.


2

I have found the answer to my own question after some more investigation. The reason the state was skipping the contents of my if statement was because the hostname of the server was in lower-case (god knows why). Therefore the in-built salt grains.item host which is called upon didn't recognise the server I was specifying.


2

You can have more than if statement per state. The issue is that your conditional doesn't seem actually be checking the hostname, it's just passing everything. Try this: {% if grains['host'] in ['dev-server2', 'test-server2'] %}


1

Yes - there are at least two options available for managing files in the manner you describe. The first such way is to manage the entire directory using file.directory: /opt/apiv2: file.directory: - user: root - group: root - dir_mode: 755 - file_mode: 644 - recurse: - user - group - mode The second way can manage a ...


1

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-duplicates) 25:19 error syntax error: mapping values are not allowed here When I add colons to the entry on lines 25 and 28: workflows: version: 2 ...


1

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 any parameters. If you have parameters, the list element is a hashmap with top element being the job name. In your specific case, this should give (note the ...


1

Have you checked the documentation for cron-jobs? You can use the run command. $ kubectl run hello --schedule="*/1 * * * *" --restart=OnFailure --image=busybox -- /bin/sh -c "date; echo Hello from the Kubernetes cluster" cronjob "hello" created This way you can loop through your customers in a bash script to deploy your containers. Not knowing the big ...


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