Questions tagged [yaml]

YaML is a human-readable data serialisation format.

Filter by
Sorted by
Tagged with
1 vote
1 answer
50 views

How to validate variables contents in Ansible?

ansible-lint only checks the tasks/handlers and doesn't iterate over the variables (e.g. if you're using with_items, it won't iterate over all the items) and yamllint only checks cosmetic issues and ...
user avatar
0 votes
1 answer
278 views

Alertmanager telegram config chat_id and cannot unmarshal errror

I am trying to configure alertmanager to send alerts to my telegram group. Following the configuration I have: global: resolve_timeout: 5m route: group_by: - job group_interval: 5m ...
user avatar
  • 11
0 votes
1 answer
241 views

Ansible "hip-profiles unexpected here" Palo alto panos_security_rule

I'm trying to set a security policy on my Palo Alto firewalls using Ansible with the panos_security_rule module. However, I keep running in to the same error, hip-profiles unexpected here. I found ...
user avatar
  • 65
0 votes
1 answer
29 views

Automate Kubernetes Deployment using ArgoCD

We have a GitHub repo containing all the Kubernetes cluster yaml files, When we want to update a deployment we simply edit the yaml and push to GitHub. Unfortunately, we then have to kubectl apply -f ...
user avatar
  • 103
0 votes
0 answers
43 views

Ansible simple inventory for dhcp hosts in yaml

Need a little hint on yaml syntax for a very simple inventory file. I want to include dhcp range of workstations in a nice inventory file. Regarding the official documentation this could be done but i'...
user avatar
2 votes
1 answer
311 views

Contents in Kubernetes pod gets empty when persistent volume is mounted

persistent volume claim and persistent volume yaml file apiVersion: v1 kind: PersistentVolume metadata: name: my-volume labels: type: local spec: storageClassName: manual capacity: ...
user avatar
  • 37
0 votes
0 answers
240 views

I m trying to use mysqldump but getting error mysqldump: Got error: 2003: Can't connect to MySQL server on host(110) when trying to connect

Here is my sam template for taking database backup trigger: - none pool: vmImage: ubuntu-latest steps: - script: echo Hello, world! displayName: 'Run a one-line script' - script:...
user avatar
0 votes
1 answer
178 views

Salt state file doesn't load info from pillar

I'm getting this error when I'm trying to apply my statefile to my minion: client.school.test: Data failed to compile: Rendering SLS 'base:nextcloud2' failed: Jinja variable 'list object' has no ...
user avatar
0 votes
1 answer
322 views

Docker private registry as kubernetes pod - deleted images auto-recreated

I run a docker private registry v2.7.0 as a kubernetes pod with a service and a persistent volume, thanks to the Varun Kumar G tutorial, which has been the only successful method on my setup, for ...
user avatar
0 votes
0 answers
24 views

Azure Devops Pipeline Trigger based on branch

My yaml pipeline is working fine which perform terraform install, init, validate, plan and apply if the changes are commit to main branch. Here, i am trying to execute the terraform apply only if the ...
user avatar
0 votes
1 answer
7k views

ansible - how to get over "conflicting action statements" error?

I have an Ansible playbook for creating and resizing logical Volumes # playbook lvol.yml - hosts: step tasks: - name: 'create /dev/sdb1 -> 20GB (of 35GB)' community.general.parted: ...
user avatar
  • 217
3 votes
1 answer
583 views

Cross-reference Ansible variables within the same mapping

How can I define an Ansible variable whose value is another variable in the same mapping structure? To allow sensible namespacing of variables, I am defining mapping structures like this, where some ...
user avatar
  • 932
1 vote
0 answers
101 views

Multiple VM deployment via GCP Deployment Manager

What I want to achieve: I want to be able to create multiple VM instance using AWX playbook or Deployment Manager. The script will read instance configuration in a csv uploaded to gcloud or bitbucket, ...
user avatar
  • 607
0 votes
1 answer
112 views

Server set up using app.yaml, cron.yaml, etc. But directories aren't recognized

As the title says, the server has been configured to recognize sub directories but for whatever reason they are not being recognized when I load a web page. Is there any way to debug what is going on? ...
user avatar
0 votes
0 answers
399 views

Ansible - issue with loop and json_query's

I am using the ansible URI module to talk to a REST api. I have a task to perform a GET to get me some data that i want to use later on. I want to be able to match a certain variable from the GET to ...
user avatar
1 vote
0 answers
851 views

patroni.exceptions.PatroniFatalException: 'Failed to bootstrap cluster'

I have a problem with patroni right here [postgres@localhost ~]$ patroni /etc/patroni.yml 2021-05-25 11:39:56,767 INFO: Selected new etcd server http://10.102.196.138:2379 2021-05-25 11:39:56,772 INFO:...
user avatar
1 vote
0 answers
2k views

yaml.parser.ParserError: while parsing a block mapping

I followed this document while configuring patroni and I have a problem with patroni.service file like this https://snapshooter.com/learn/postgresql/postgresql-cluster-patroni [Unit] Description=...
user avatar
0 votes
1 answer
208 views

deploying on hosts with ansible based on yaml file

Developers are going to provide a yaml file with hosts in particular order (every deployment can differ, depend on needs) and each field in yaml file will have instructions for example install yum ...
user avatar
1 vote
0 answers
452 views

Configure AWS Cloudfront to send custom query params to origin

is it possible to configure my AWS Cloudfront distribution to append to the request a custom query param (e.g a private key) before sending it to origin? For example, the front end is calling *....
user avatar
  • 111
-1 votes
1 answer
4k views

How to combine YAMLfiles in Python?

I have some Kubernetes YAML files which need to combined. For that I tried using Python. Second file (sample.yaml) should be merged to the first file source.yaml Like, the source.yaml has one section ...
user avatar
  • 247
0 votes
1 answer
130 views

GCP Deployment Manager: where to find a reference guide to properly create YAML config and template files?

I started working with Google Cloud Deployment Manager upon request of a client, using YAML config files, but I can't find anywhere how to map the reference shown in https://cloud.google.com/...
user avatar
  • 103
0 votes
1 answer
980 views

Merge few files in Ansible lookup file

So far I use simple code to deploy Docker stacks. I don't want to use community.general.docker_stack module, due to its ridiculous requirement: the stack definition (docker compose yml file) needs to ...
user avatar
1 vote
0 answers
137 views

How to monitor datadog-agent's certificates expiration?

I have an nginx-pod which redirects traffic into Kubernetes services and stores related certificates insides its volume. I want to monitor these certificates - mainly their expiration. I found out ...
user avatar
2 votes
1 answer
832 views

AWS CloudFormation - Creating Layer Version and Function that uses layer

I have a Cloudformation template that currently looks roughly like the following. Resources: MyLayer: Type: AWS::Lambda::LayerVersion Properties: CompatibleRuntimes: - nodejs12....
user avatar
1 vote
1 answer
727 views

How to convert and save raw data to PDF format using ansible

I will be getting some raw data directly from an API. I want to format this and convert into PDF file and save it. I gone through ansible modules. I am not getting any idea in this. Can someone ...
user avatar
  • 123
2 votes
3 answers
21k views

Ansible check if variable exists in attribute list

I have a variable containing details of host machines on my network (called 'hostlist' - I believe you call this a dictionary, but I'm not sure of the terminology. The variable is defined in a file in ...
user avatar
0 votes
0 answers
916 views

How to log HTTP requests in file in Dropwizard?

I'm having issue in my Dropwizard (version 1.3.8) app logging HTTP Requests into file. I've followed Dropwizard's documentation for configuration of YAML file and my config.yml looks like this: ...
user avatar
  • 101
3 votes
2 answers
7k views

How to pass a group value in inventory file to jinja2 template file in ansible

I have an inventory file named hospital.inventory and it contains following group with a single value. [dockerSwarmManager] hp2-3.mydomain.com Then I have a file name security.json.j2 inside the ...
user avatar
1 vote
1 answer
4k views

Use lookup/dynamic variable names in Ansible jinja2 template

The playbook below should generate a file with the content: a,b ssh_host_key ssh_rsa_host_key However, the way I construct the variable names results in either syntax/templating errors or 'variable ...
user avatar
  • 137
1 vote
1 answer
891 views

When using an Ansible playbook, how do you store and use a password containing quotes or other metacharacters without them being interpereted?

My company uses Ansible (which I am a novice at) and we have a playbook and a related role for joining new Linux machines to AD. Our admin accounts have their passwords rolled three times a day, and ...
user avatar
  • 113
1 vote
0 answers
53 views

Puppet - Get interface name from netplan yalm config

How to get interface name which has nameservers defined? I want to get the interface name so I can pass it to another netplan puppet module so the nameservers can be replaced. But I only want to get ...
user avatar
  • 11
1 vote
1 answer
311 views

Create a tree-like structure with ansible

I have to create an LDAP structure with users and groups. The groups are a bit complex with a lot of nested groups etc. I need to create a tree like structure in my inventory, like the following: ---...
user avatar
1 vote
1 answer
398 views

pod's name from an environment variables defined in yaml

how can I create a yaml file for pod that get its name from a environment variables defined in yaml file. I have tried this but it is not allowed. metadata: generateName: $(HOSTNAME) . . . env: ...
user avatar
  • 121
1 vote
1 answer
394 views

Templated dict keys in ansible YAML

I am trying to use a dict in an Ansible task, which is defined like this: in vars/main.yml file: username: user1 userpass: pass1 users: "{{ username }}": pass: "{{ userpass }}" This doesn't ...
user avatar
1 vote
1 answer
202 views

Puppet parse hiera in inline_template

I have got some .yaml hiera file with: iptables::test: ip: 1.1.1.1 : 'adm-1' 2.2.2.2 : 'adm-2' 3.3.3.3 : 'adm-3' And i want to parse this file in inline_template. I write: $...
user avatar
0 votes
0 answers
142 views

Using 'archive_command' directive on postgres container in kubernetes 'invalid argument: "%p"

I've got Postgres 11.5-alpine running in kubernetes in a leader-follower setup that has been working well using streaming replication for some time. I've decided to cover my bases by writing the WAL ...
user avatar
1 vote
1 answer
281 views

Install gRPC php extension in elastic-beanstack [closed]

I need to install gRPC php extension elastic-beanstack. The way i found is to write a config file inside ".ebextensions" in order to automatically install the extension. For that I need to create yaml ...
user avatar
2 votes
1 answer
1k views

How can I enable epel-release before installing packages with cloud-init?

I'm trying to install a few packages on CentOS 8 via cloud-init, like this: package_upgrade: true packages: - firewalld - htop One of them one of them requires epel-release repo to be installed ...
user avatar
  • 351
2 votes
1 answer
9k views

How to use Ansible modules replace or inline instead shell command with SED

i have file with string: MYAPP.db.username.DEV=MYUSERNAME Where: MYAPP mean name of applications DEV means environment MYUSERNAME means name of user for connection to db I need to replace these ...
user avatar
  • 501
1 vote
0 answers
261 views

Gitlab CI/CD with conditional scripts

Here is what I wish to do in GitLab CI/CD: Whenever something is pushed into a specific branch I wish to have multiple scrips and CI/CD should decide which script should be run based on the pushed ...
user avatar
  • 984
4 votes
1 answer
5k views

Adding an existing security group CloudFormation EC2 template

Instead of having to set ingress and egress rules, how do I reference existing EC2 security groups in a CloudFormation Template? Resources: EC2Instance: Type: AWS::EC2::Instance ...
user avatar
1 vote
1 answer
109 views

"Report-To" HTTP header implementation for GAE Standard

I'm attempting to add a "Report-To:" HTTP header to our App Engine's app.yaml configuration file for integration with https://report-uri.com (based on the Reporting API here, here, and here) but when ...
user avatar
1 vote
0 answers
104 views

Best way to declare Icinga host variables in an Ansible variable

I am writing an Ansible role to build some Icinga 2 configurations, and the more important is the configuration of a client host in a distributed Icinga installation. I want to declare Icinga 2 host ...
user avatar
  • 1,753
2 votes
2 answers
2k views

SaltStack: found conflicting ID

My sls file: /etc/sudoers.d/foo: file.managed: - contents: | foo ALL = NOPASSWD: /usr/bin/systemctl restart minio_storage-foo.service foo ALL = NOPASSWD: /bin/systemctl restart ...
user avatar
  • 2,974
2 votes
1 answer
5k views

Ansible error: The tasks/main.yml file for role 'common' must contain a list of tasks

I inherited this ansible git from my predecessor. I can't get it to work though and I guess it's something basic that I'm missing. It keeps giving me this lovely error: ERROR! The tasks/main.yml file ...
user avatar
2 votes
1 answer
892 views

Unable to delete daemonSet in k8s

I've created a daemonSet in k8s under the namespace kube-system. While trying to delete the deamonSet it got stuck (also when I force it) I've already tried to set a updateStrategy: RollingUpdate To ...
user avatar
1 vote
1 answer
4k views

Ansible expect is not sending response

I'm new to ansible and trying it by writing an ansible playbook for installing graphite, as a part of it I have the graphite-manage syncdb command which I would like to automate. I wrote this task to ...
user avatar
  • 13
0 votes
1 answer
8k views

Ansible Playbook and syntax issue with variables

I'm trying to execute the below playbook I wrote but it fails on some syntax errors. I tried few things from the online doc but without sucess so far. The aim of these variable is to generate a ...
user avatar
  • 15
0 votes
2 answers
5k views

Dynamic inventory in yaml format

Background I have domain managed via Terraform and it outputs server IP address. Then I have a script which outputs YAML inventory (outputs follows later). Ansible 2.6.2 Source of format: https://...
user avatar
0 votes
1 answer
729 views

ERROR: (gcloud.app.deploy) - python script

I am trying to deploy a python application and I am receiving the following error message: ERROR: (gcloud.app.deploy) Error Response: [4] Your deployment has failed to become healthy in the ...
user avatar