Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [yaml]

YaML is a human-readable data serialisation format.

1
vote
0answers
26 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 ...
0
votes
1answer
158 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
115 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
0answers
179 views

CircleCI deploy to AWS EC2

I have/want a workflow like so: Push branch to Bitbucket Pull request branch into Master in Bitbucket This triggers CircleCI to do a build CircleCI deploys the successful build to AWS EC2 instance I ...
0
votes
2answers
832 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
154 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
3k 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
361 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
686 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
319 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
75 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
833 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' ...
1
vote
2answers
1k 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
275 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
1k 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
1k 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
1k 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 ...
0
votes
1answer
1k 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
417 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
1answer
675 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
465 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
1k 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
360 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 ...
3
votes
2answers
3k 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
434 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
671 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
923 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
359 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
14k 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
226 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('...
0
votes
1answer
911 views

How can I install Development Tools via vagrant and ansible on Centos 6.7

I get this error when running my first ansible playbook (i.e. I am not familiar with ansible yet) TASK: [Install packages] ****************************************************** failed: [default] =&...
5
votes
1answer
105 views

Why do some r10k configuration files start their YAML lines with :?

I'm looking at setting up r10k for Puppet deployment, and I have various example r10k.yaml configuration files, but some seem to use an extra : at the start of many lines, for instance, at http://www....
3
votes
1answer
2k views

dict as value for YAML key in an Ansible task

I am unable to figure out how to pass a dictionary/hash-map of key-value pairs as the value for an option in an ansible tasks. Default Options: # roles/ec2/defaults/main.yml ec2: key_name: "{{ ...
1
vote
2answers
74 views

Linux program used to gather installed packages, processes, listening ports, etc.?

It's hard to Google this because it seems like everyone and their kid sister has written a script to gather system stats! I once saw a mature program written that is used to gather system stats like ...
1
vote
1answer
2k views

saltstack configuration “No Top file or external nodes data matches found”

A very similar version of this question is asked here , but it's completely different since the person had their top file in the wrong directory. I have 3 projects, that I'll call project1, ...
0
votes
2answers
678 views

CoreOS on Google Compute Engine

I have followed the CoreOS on GCE guide. But looks like I am having problems understanding what the user-data metadata field is, and how to get my cloud-config file to be read.. In a directory that ...
0
votes
2answers
199 views

Hiera datatypes wont load in Puppet

I have spent a couple of days on this, followed the instructions on http://downloads.puppetlabs.com/docs/puppetmanual.pdf and even the Puppet Training Advanced Puppet manual. When I run a test ...
3
votes
1answer
5k views

How to define multiple /etc/hosts entries with Puppet ENC?

I'm writing an External Node Classifier for my Puppet infrastructure, and I have the need to manipulate the /etc/hosts file on each node. The following (due to the duplicate key) is invalid YAML: --- ...
4
votes
1answer
1k views

Verifying Salt states before committing

I'm storing my salt sls files in a git repository, but I have the perennial problem that I can't verify my YAML represents a valid set of states that could be applied (I've also had difficulty ...