Questions tagged [yaml]

YaML is a human-readable data serialisation format.

Filter by
Sorted by
Tagged with
0
votes
0answers
39 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:...
1
vote
0answers
47 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=...
0
votes
1answer
38 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 ...
0
votes
0answers
20 views

Convert host_vars YAML to my.cnf config file via jinja2

please advice on how to create jinja template from mariadb settings. I have /path/to/ansible/host_vars/server.com/: myvar_mariadb_services: max_allowed_packet: 1024 key_buffer: 512M I ...
0
votes
0answers
9 views

Calling userdata from S3 bucket

What I am trying to do is that I want to call a yaml file from S3 Bucket using the transform parameter. The yaml file would have userdata stored in it. I am trying my best until now but whenever I try ...
1
vote
0answers
22 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 *....
0
votes
1answer
143 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 ...
0
votes
1answer
40 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/...
0
votes
1answer
163 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 ...
1
vote
0answers
41 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 ...
0
votes
0answers
20 views

How to run ADFSDomainTrustMods.yaml in azure

I need to be able to run this file in my Azure environment https://github.com/Azure/Azure-Sentinel/blob/master/Detections/AuditLogs/ADFSDomainTrustMods.yaml I have looked all over the web and get all ...
0
votes
0answers
176 views

Ansible lookup plugin 'aws_secret' returning Signature Expired

After some months working perfectly well, a task where I use the plugin lookup aws_secret began to return the following error: {"msg": "An unhandled exception occurred while running ...
2
votes
1answer
249 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....
1
vote
1answer
262 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 ...
1
vote
3answers
7k 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 ...
0
votes
0answers
484 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: ...
0
votes
0answers
43 views

elastalert custom alert rule for detecting more than 20 4xx req per min by Unique IP

Currently i installed elastalert for getting alert through kibana. But now i am stuck with it's rule and i have to set a custom rule which sent an alert when more than 20 4xx requests detected per min ...
3
votes
2answers
3k 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 ...
0
votes
1answer
2k 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 ...
1
vote
1answer
448 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 ...
1
vote
0answers
32 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 ...
1
vote
1answer
56 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: ---...
1
vote
1answer
173 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: ...
1
vote
1answer
119 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 ...
1
vote
1answer
98 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: $...
0
votes
0answers
80 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 ...
1
vote
1answer
173 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 ...
2
votes
1answer
774 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 ...
1
vote
1answer
5k 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 ...
1
vote
0answers
197 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 ...
2
votes
1answer
3k 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 ...
1
vote
1answer
99 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 ...
1
vote
0answers
91 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 ...
0
votes
2answers
1k 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 ...
2
votes
1answer
4k 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 ...
2
votes
1answer
778 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 ...
1
vote
1answer
3k 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 ...
0
votes
1answer
6k 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 ...
0
votes
2answers
4k 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://...
0
votes
1answer
658 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 ...
2
votes
1answer
8k views

Problems with setting up bonding on Netplan (Ubuntu server 18.04)

I have a dual port network card that I want to bond both ports and balance the traffic between ports. I want 1 static IP address. I used to ubuntu 16.04 and this worked fine. Im now trying to set ...
0
votes
3answers
1k views

Can you set the number of rounds that ansible's password_hash jinja2 filter uses?

In ansible, it's pretty convenient to use something like this: - name: Make sure user password is set user: name: my_user password: "{{ user_password|password_hash('sha512', 'SomeSalt') }}"...
5
votes
2answers
4k views

Is it possible to change the current user's password in-band with ansible?

I have a Linux distribution that is freshly installed. It has a regular user with a default password, and a locked down root account (no password on root - can't be SSHed as directly). I want to be ...
0
votes
1answer
1k views

Encrypting properties with “eyaml edit” without a private key?

I would like to use eyaml edit to edit my Puppet/Hiera configuration files. My configuration files are a mixture of encrypted and plain text content. I want to use eyaml edit to encrypt certain ...
0
votes
1answer
183 views

app.yaml isn't updated when I deploy (Google App Engine, Java)

This is what I put in the app.yaml file: runtime: java8 service: 'scheduler' inbound_services: - warmup derived_file_type: - java_precompiled threadsafe: True auto_id_policy: default api_version: '1....
0
votes
1answer
3k views

I want to run a.sh on remote hosts and fetch all output files. output file with timestamp. I wrote below code and it is failing with error

I want to run a.sh on remote hosts and fetch all output files. output file with timestamp. You can see below my ansible tasks. --- - name: 'abcd' hosts: 'all' gather_facts: 'false' ...
4
votes
2answers
8k views

How to merge variables of type hash across different variable files in ansible?

I have two YAML variable files which are reused for many playbooks: # playbook/group_vars/all settings: a: 1 b: 2 # inventory/group_vars/main.yml settings: c: 3 I want settings to be equal {...
1
vote
1answer
562 views

app.yaml isn't updated when I deploy (Google App engine/Google Cloud Platform)

This is my default app.yaml file: runtime: custom env: flex service: api runtime_config: jdk: openjdk8 handlers: - url: /.* script: this field is required, but ignored automatic_scaling: ...
1
vote
1answer
2k views

CloudFormation template: how to use Sub and GetAtt at the same time in short form?

I'm using yaml. So, we can use either: !GetAtt [ WebServer, AvailabilityZone ] !GetAtt WebServer.AvailabilityZone Also, we can use: !Sub 'sometext-${AWS::StackName}' how can I use GetAtt output ...
0
votes
1answer
2k views

Manage list of local users via ansible

I have Linux servers that are using local accounts and I would like to find a way, with ansible, to maintain them. My goal is to keep the same list of users on all servers and be able to efficiently ...