Questions tagged [yaml]

YAML is a data serialization format designed for human readability. YAML is a recursive acronym for "YAML Ain't Markup Language". JSON syntax is similar to and a subset of YAML

Filter by
Sorted by
Tagged with
0 votes
1 answer
41 views

Cloud-config in Terraform does not work, nothing seems to happen and it fails silently

I'm currently provisioning a machine with Cloud Config in user_data (I've also tried user_data_base64). When I run my command in Terraform I have, resource "aws_instance" "web" { ...
user avatar
0 votes
0 answers
28 views

Trigger different environments in one pipeline

I have a dev, uat, and prod environment for my ado project, and I just completed a pipeline deploy to dev. Is it better practice to have a second pipeline that triggers on the uat branch, or is ...
user avatar
  • 13
0 votes
0 answers
21 views

Using SignTool.exe within Dockerfile

I am using signtool.exe to create a digital signature for the libraries within my .net solution. I can run the command just fine in a windows command prompt. signtool sign /f "test.cer" &...
user avatar
0 votes
0 answers
249 views

kustomize apply nameprefix and commonlabels to a list in path

i have this: kustomization.yaml: apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization configurations: - configuration.yaml namePrefix: app-prefix- resources: - logging-output.yaml - ...
user avatar
0 votes
0 answers
74 views

Gitlab Parent-Child pipeline: using branches in the parent pipeline repository for new feature implementations

Environment: Parent-child pipeline branch off of main. Branch: testBranch Expected functioning config name: .scan.yml:refs/testBranch@url/scanPipeline Working config name (this uses the default master/...
user avatar
  • 101
0 votes
1 answer
120 views

YAML based azure build pipeline to run particular tasks based on condition?

Need to create a YAML based azure build pipeline i.e, need to run particular tasks like only build step when it is PR automated and when the same pipeline manually run it should run build task along ...
user avatar
0 votes
0 answers
26 views

Spruce: How to grab a specific value from a different YAML file?

Spruce, the yaml templating engine has the 'grab' operator however every example I've seen references a local path: cluster: name: cluster1 client: connect_to: (( grab cluster.name )) ...
user avatar
3 votes
0 answers
820 views

Jenkins Unable to Match Two Identical Strings

I have a config file that's in YAML format, which includes this relevant portion: project: protectedBranches: - master - develop - feature/something In my Jenkinsfile, the YAML file is ...
user avatar
  • 835
1 vote
1 answer
366 views

How to get information about resources in an Azure Pipelines run?

I work in a platform team that builds and supports Azure Pipelines YAML templates and various custom scripting for these pipelines. People in my organisation use these YAML templates like: resources: ...
user avatar
2 votes
1 answer
147 views

Ansible - Variable expansion inside hostvars declaration?

I have a hardcoded hostvars line, like so: node1_hostname={{ hostvars['192.168.0.162']['node1_hostname'] }} I have a set_fact variable from a previous play that I'd like to expand in the host section ...
user avatar
  • 51
2 votes
3 answers
960 views

Add item(s) to yaml array only if defined (ansible)

How do I write a yaml file such that it defines an array with a list of values, and it skips those values from being added to the yaml array if the given value is undefined? Specifically, I'm trying ...
user avatar
0 votes
1 answer
592 views

Retrieving project version from csproj in Azure Pipeline .NET Core CLI task

I have the following tasks in my yaml file in Azure DevOps It publishes my console application and zip it in a file - task: DotNetCoreCLI@2 inputs: command: 'publish' publishWebProjects: ...
user avatar
  • 101
1 vote
0 answers
41 views

How to test pipeline changes in Azure?

I currently have a pipeline in Azure which consists of a bunch of YAML which eventually calls some terraform script to handle the deployment side. What is the best way to handle dev testing of changes ...
user avatar
  • 111
4 votes
2 answers
2k views

Kubernetes configuration with yaml anchors

I have a deployment.yaml file and want to reuse the environment for all my deployments like this: apiVersion: apps/v1 kind: Deployment metadata: name: beat spec: selector: matchLabels: ...
user avatar
-1 votes
1 answer
2k views

invalid base hashes in `extends` with 'include' -- gitlab-ci

I have a huge .gitlab-ci.yml file that I am trying to turn into the "main" ci file by moving some parts to another files which will then be called with the use of the "include" ...
user avatar
0 votes
1 answer
340 views

devops - Optomizing gitlab cicd pipeline's caching

I have a gitlab yaml I've been working on for a bit and while everything works it seems like each job takes quite a bit longer than it should. I tend to think the culprit is that npm files are fetched ...
user avatar
  • 133
3 votes
1 answer
11k views

ansible error: skipping: no hosts matched

I've tried a few variations on running ansible locally as a test case: nicholas $ nicholas $ ls ansible.cfg ansible.cfg.orig first_playbook.yml inventory.txt playbook.yml nicholas $ nicholas $ ...
user avatar
0 votes
2 answers
993 views

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

How do I get the ansible config for rolly below? remote: [nsaunders@rolly ~]$ [nsaunders@rolly ~]$ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: ...
user avatar
1 vote
2 answers
467 views

gitlab CI job fails after manual ftp deploy (lftp) command completes successfully

Scenario I'm using LFTP to deploy files via sftp. The transfer completes successfully and all files get to the destination but for some reason the job fails. Question How can I find out what is ...
user avatar
  • 133
1 vote
1 answer
105 views

How to render assets when building a static website with GitLab Pages and Jekyll

I'm using Jekyll to build a static site and deploy it with GitLab Pages. This site is compounded of posts (contained in the site/_posts folder) and refer to other HTML and Markdown documents that I ...
user avatar
  • 607
1 vote
1 answer
643 views

Azure DevOps Pipelines running on incorrect branches

I'm attempting to build different branches with different YAML configuration files in each branch. However, when I commit to a branch that should only trigger 1 pipeline it triggers both. Development ...
user avatar
  • 121
1 vote
4 answers
517 views

Passing replicas number into container

I have a statefulset with an init container which creates openshift objects upon scaling. I need to pass it the replicas number from the same yaml definition. However the replicas filed doesn't seem ...
user avatar
3 votes
2 answers
1k views

yaml files in jenkins pipeline

Just started out working on jenkins, among other things I'm trying to understand the role of yaml in pipelines. I understand that pipelines or declarative pipeline (do other type of pipelines exist in ...
user avatar
  • 131
2 votes
1 answer
481 views

Gitlab: Always having the possibility to launch a manual job (even if something failed before)

I'm using gitlab-ci. I have a pipeline that has the following steps : code-verification some tests deploy (manual) some more tests rollback (manual) Both the deploy and the rollback job have to ...
user avatar
5 votes
1 answer
3k views

How to properly setup a multi-environment release pipeline in Azure YAML pipelines?

We have just migrated from TFS 2018 to Azure DevOps Services and we're having a hard time trying to figure out the new Azure YAML pipelines. We want to be able to: Run a build/test pipeline when a ...
user avatar
  • 67
5 votes
1 answer
744 views

Ansible: Use inventory_hostname variable in lineinfile module

I'm using Ansible 2.7.9 and I'm having trouble with the regex definition in the lineinfile module. My file has the following line: host.example.com = /path/to/a/directory I want to remove that line. ...
user avatar
3 votes
2 answers
3k views

docker-compose multiple services in a loop

Trying to optimize definition of multiple services with docker-compose.yml Here is the original, "dumb" variant of the docker-compose.yml: version: '3' services: s1: build: . ports: - "...
user avatar
1 vote
1 answer
243 views

Ansible seems to execute infinite loop

I wrote some roles for my home lab to setup a GlusterFS cluster. But when I run it on my 2 nodes, some tasks get executed over and over again and it seems that it never ends. Here is the log output (...
user avatar
  • 207
2 votes
1 answer
415 views

Running two containers in a kubernetes job each with their own initContainers

In this SO article I understand that I can run a sequence of initContainers before running the containers defined in spec.template.spec.containers. https://stackoverflow.com/questions/40713573/how-...
user avatar
3 votes
2 answers
7k views

Custom inventory file failing to parse properly

I've got the following production inventory file (playbooks/production.yaml) for Ansible: all: children: control: moriarty.server.com toby.server.com managed: sherlock....
user avatar
0 votes
1 answer
171 views

Why Ansible skip items in inserafter?

I have about 10 hosts that I run a playbook for them with serial:1. in this playbook there is this code which append output of all commands in one file: - name: copy the output to a local file ...
user avatar
2 votes
1 answer
6k views

how to prevent Ansible from showing output on screen?

I have this in my playbook which execute a command on remote server and enters its log on local server. - name: run script shell: runuser -l testuser -c "/tmp/test.sh" register: myshell_output ...
user avatar
0 votes
1 answer
390 views

error validating data: couldn't find type

I have following yaml file: --- apiVersion: v1 kind: pod metadata: name: Tesing_for_Image_pull.pod spec: containers: - name: mysql image: mysql ...
user avatar
9 votes
3 answers
10k views

Rename build pipeline .yml files in Azure DevOps

I have a .NET Core application that has three build pipelines. (Windows, Linux, macOS) In each of them, the application gets assembled a little different. This part works so far. Azure created for ...
user avatar
1 vote
1 answer
5k views

Error passing arguments to ansible playbook

I am trying to create a playboook that executes a python3 script with 2 parameters, name and password in localhost. However, when i try to execute the paybook with this command ansible -b --become-...
user avatar
  • 113
4 votes
3 answers
7k views

How to pass Gitlab env var with sensitive characters to bash script?

I have the following situation: I'm storing sensitive data in Gitlab's environment and then passing these variables to a deployment script in bash. Gitlab's env var: Key: sensitive_var Value: aaa$...
user avatar
  • 43
2 votes
2 answers
20k views

Unable to parse YAML: mapping values are not allowed here

Good morning. I'm migrating from Gitlab to CircleCI and try to map out a simple pipeline ("workflow") that basically should look like this: [build] -> [tests] -> [release*] * only on tags I ...
user avatar
  • 123
0 votes
1 answer
29 views

What options are available to get a value that is associated to a key in yaml?

I often used jq to lookup a value in json. How to do this in yaml? I do not want to use something like sed as too much characters have to be removed then.
user avatar
  • 12.6k
3 votes
1 answer
820 views

Unable to run playbooks using Ansible best practices layout

I am very new to ansible and I think I am lacking something basic that I am not finding in the examples or on github as to the directory structure and its use. I have set up my directory structure ...
user avatar
0 votes
1 answer
6k views

error validating data: ValidationError(Deployment): unknown field "spec" in

I know that yml files are temperamental and I still struggle to figure it out. Can anyone help out here to understand what is it about my client-deployment.yml file that makes Kubernetes want to issue ...
user avatar
  • 419
1 vote
0 answers
152 views

echo colon to file in cloud-init [closed]

So, I have this part in my cloud-init: runcmd: - echo : RSA 'node.crt' >> /etc/ipsec.secrets I literally can't make it to work. I tried these variations: runcmd: - echo : RSA 'node.crt' ...
user avatar
  • 11
2 votes
0 answers
489 views

How to ensure testing execution order with GitLab CI? [closed]

I have about half a dozen of integration tests (handled with Robot Framework) to run in a GitLab CI pipeline. Once upon a time, we did not care about the execution order of these tests. The ...
user avatar
  • 607
15 votes
3 answers
29k views

Is it possible to have multiple gitlab-ci files in a single repo?

I have a single repo handling integration tests for 4 different software projects. As those projects share common resources, I'd like to create a generic file in which all those common features are ...
user avatar
  • 607
0 votes
1 answer
68 views

Are there dialects of YAML or just differences in parsing it?

We use YAML in several frameworks to define types and structures for our deployments. I read an article about why some people don't like YAML and they stated that the parsing of YAML is very different ...
user avatar
1 vote
1 answer
1k views

How to exclude a certain linenumber of an Ansible playbook when testing it using Molecule?

The aim is to exclude a certain line that contains a checksum and cannot be smaller than 80 characters. --> Scenario: 'default' --> Action: 'lint' --> Executing Yamllint on files found in /...
user avatar
  • 12.6k
1 vote
0 answers
439 views

Kubernetes Continuous deployment stage in Gitlab Online fails [closed]

I am working on setting up a cloud DevOps deployment pipeline using Gitlab CI online, Kubernetes, and docker. I am following an example post at Continous delivery of a spring boot application with ...
user avatar
  • 189
2 votes
1 answer
2k views

Helm/ YAML indentation issue

I am etting weird YAML indentation with some conditional stuff, effectively I'm doing: resources: {{ toYaml .Values.resources | indent 10 }} {{- if .Values.filebeat.enabled -}} - name: elastic-...
user avatar
0 votes
1 answer
3k views

Kubernetes create multiple jobs based on template and list

We are currently migrating many of our production data ingress/processing scripts/processes into a kubernetes cluster. Each "customer" or company that we interface with has a bunch of data and we want ...
user avatar
4 votes
3 answers
1k views

Yaml linting failling when jinja is used

I am using https://yamllint.readthedocs.io/en/stable/index.html to lint my yaml files (used in a saltstack context, and linted by jenkins jobs at every commit), but as reported and explained here, it ...
user avatar
  • 332
0 votes
1 answer
2k views

Suspend autoscaling processes through Cloudformation template

I have the following autoscaling as a Cloudformation template : MyAutoScalingGroup: Type: AWS::AutoScaling::AutoScalingGroup Properties: DesiredCapacity: 1 MinSize: 1 ...
user avatar