Questions tagged [yaml]

YaML is a human-readable data serialisation format.

Filter by
Sorted by
Tagged with
1
vote
1answer
32 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
7 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
0answers
25 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: ---...
0
votes
0answers
48 views

How do I allow POST method in Ansible Tower

Currently, it looks like Tower just allows GET, HEAD, OPTIONS. I get a 401 unauthorized error when trying to get an OAuth 2.0 token for my application. GET /api/ HTTP 200 OK Allow: GET, HEAD, ...
0
votes
1answer
58 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
14 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
44 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
38 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 ...
0
votes
0answers
23 views

symlink issue with saltstack pillar data

I'm working with an inherited system where AWS infrastructure is currently being managed via Terraform and Salt, with pillar data stored in a remote git repo. In the original repo I can see the team ...
1
vote
1answer
80 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 ...
0
votes
1answer
228 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 ...
0
votes
1answer
1k 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
105 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 ...
1
vote
1answer
1k 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 ...
0
votes
0answers
45 views

Running iPhone simulator on Azure in background

I am building a cross-platform C++ project which has unit tests written with googletest framework and there are issues I am facing when trying to run unit tests on iPhone simulator on Azure DevOps. ...
0
votes
0answers
150 views

terraform init and apply in docker-compose.yml

Trying to run docker-compose up to spin up this docker image: hashicorp/terraform:0.11.13 (need that specific). I expect: a terraform container to run both terraform init and terraform apply commands ...
1
vote
1answer
85 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 ...
0
votes
0answers
25 views

Cloud formation shell command not working in Custom AMI Image

I have Customize AMI Image in AWS Account there i want to run cloudformation script. but below mention UserData part not executing in EC2. Same script running with official Ubuntu AMI image ami-...
1
vote
0answers
86 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
432 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
2k 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
505 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
2k 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
4k 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
483 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 ...
1
vote
1answer
6k 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
972 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') }}"...
4
votes
2answers
3k 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
149 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
2k 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' ...
3
votes
2answers
5k 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
504 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 ...
0
votes
1answer
4k views

How to use vars in ansible roles

I want to create a ansible role to add user with ssh_keys ├── ansible.cfg ├── hosts ├── playbooks │   └── add_user.yml └── roles └── add-user ├── files │   ├── ansible.pub ...
1
vote
1answer
2k views

CloudFormation stack yaml syntax?

I'm trying to create a SecurityGroup which has a tag like Name: SG-StackName. This code works perfect in json: "Resources": { "SecurityGroup": { "Type": "AWS::EC2::SecurityGroup", ...
0
votes
2answers
656 views

How can I make salt-api return more useful data?

salt-master: 2016.11.5 (Carbon) salt-api: 2016.11.5 (Carbon) salt-minion 2016.11.5 (Carbon) cherrypy: 10.2.2 After setting up salt-api using this tutorial I've been able to successfully use the API ...
0
votes
2answers
1k views

Ansible match and change a bash prompt with regex

I would like to change the bash command prompt string from PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' to PS1='${debian_chroot:+($...
0
votes
0answers
609 views

Use encrypted eyaml data from puppet file?

I'm storing some sensitive data using eyaml. I have the encryption part working and integrated into my Hiera setup but I'm not sure how to unencrypt from within a puppet file. When I run the ...
0
votes
1answer
2k views

docker compose sharing volumes with mapped to paths

I have the following yaml version: '2' services: database: image: sameersbn/mysql container_name: invoiceplane_mysql volumes: - /srv/docker/invoicePlane/mysql:/var/lib/mysql/ ...
0
votes
1answer
551 views

How do I loop over items 1 by 1 in Ansible config (YAML/Jinja2)?

I am trying to loop over my hosts from my inventory in Ansible, and use the name of the host of that iteration in a command. In particular, I am trying to set the hostname of each of my hosts to ...
6
votes
2answers
6k views

quoting colon in ansible

I am trying to use ansible to check that the output of a particular program is set to a certain value. That value includes a colon followed by a space, and this seems to register as a syntax error no ...
3
votes
2answers
444 views

How does the formatting policy look like since Ansible 2.0?

I have seen multiple Ansible examples on github and in the ansible docs, e.g.: --- # this might be in a file like handlers/handlers.yml - name: restart apache service: name=apache state=restarted ...
1
vote
1answer
948 views

Saltstack for firewalld

I am trying to get a state set up so that I can add the associated ports open in firewalld. Tried every example I can find and all fail. Here is my current: firewalld: service.running: - ...
0
votes
1answer
1k views

Unable to form a link of a file which is in sites-available to a directory sites-enabled in remote server using ansible?

Unable to form a link of a file which is in sites-available to a directory sites-enabled in remote server using ansible? This is command I want to execute using file module of ansible: ln -s /etc/...
1
vote
1answer
481 views

Commands not working “with_item” in ansible playbook

I am new to ansible and trying to write a basic playbook for mongodb backup with simplest method. here is what i am trying to do: --- - hosts: mongo tasks: - name: Mongo Dump command: ...
4
votes
3answers
29k views

Get current hostname and push it into conf file with ansible

I'm working into an ansible playbook to get the current hostname of a server and then set it into a configuration file. I cannot figure it out how can I push the shell output using the lineinfile ...
-2
votes
1answer
284 views

Return yaml value to puppet fact lookup

I'm trying to resolve a YAML value in a module file { '/boot/config.txt' : ensure => present, mode => '0755', content => $::hostname?{ 'serverName1.domain' => template('...