Below is my playbook:
- name: "Collecting File details"
shell: "ls -ltr {{ item }} | awk '{$2=$4=$5=""; print $0}' | tr '\n'
'\t' | tr -s " ";
with_fileglob:
- "{{ playbook_dir }}/tmpfiles/*"
I get syntax error due to the awk command as below.
ERROR! Syntax Error while
found the solution. i should use '#\s+Hostname\=' in quotes
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to ansible-project+unsubscr...@googlegroups.com.
To v
I'm wondering why the pexpect module is failing in this
circumstance, perhaps my regex is not right, but the double ':' may be
messing with things as well and I'm not sure how to approach handling it.
if I run-
keybase pgp encrypt -m 'secret' | keybase pgp decrypt
Then this prompt may occ
That provides me this:
TASK [debug number on array after unuiqe]
***
ok: [localhost] => {
"msg": "'\"10\"'"
}
how do i clean that up to onl
>
> 1. Is it allowed (as per the GNU license) to also customize the existing
> Windows Modules or only add new ones?
>
Please note I am not an IP lawyer so I recommend you talk to your company's
legal team if you actually want legal advice.
Of course, any community member can make changes to t
On 27.08.2019 22:32, Nicholas Britton wrote:
> And this error when the next uri call attempts to use it, notice, how at
> the end i puts the list in unicode format, and the url does not know how to
> interpret that.
> TASK [list sessions for 886000428027 - ams]
> ***
Right. Just mentioning an option.
On Tue, Aug 27, 2019 at 4:37 PM Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:
> On 27.08.2019 22:33, Jonathan Lozada De La Matta wrote:
> > you can run multiple plays in one playbook. For example:
> >
> > hosts: localhost
> > roles:
> >- create_v
On 27.08.2019 22:33, Jonathan Lozada De La Matta wrote:
> you can run multiple plays in one playbook. For example:
>
> hosts: localhost
> roles:
>- create_vm
>
> hosts: vm_created
> roles:
>- configure_vm
>
> this also assumes you are using add_host in the first play.
Nick is asking for
you can run multiple plays in one playbook. For example:
hosts: localhost
roles:
- create_vm
hosts: vm_created
roles:
- configure_vm
this also assumes you are using add_host in the first play.
On Tue, Aug 27, 2019 at 4:26 PM Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:
> On 2
I am building a list with output stored from a uri call:
- name: Get hostgroup info
uri:
url:
"{{baseurl}}views/host-groups?$query=hostGroup.storageDeviceId%20eq%20'{{ui}}'%20and%20hostGroup.hostGroupName%20in%20[{{vmc02}}]"
method: get
validate_certs: no
headers:
On 27.08.2019 22:21, Nick Kakouros wrote:
> Is there a way to say to ansible to run all plays in parallel? I could find
> workaround in bash, but I would like to know if this is possible in ansible.
It's not possible in Ansible, so you would need to run multiple
ansible-playbook in bash.
--
Ka
Thanks Kai for your thoughts.
On Tuesday, August 27, 2019 at 3:17:56 PM UTC-3, Gilson Soares [GM] wrote:
>
> I'm new using Ansible but I'd like to start using best practices.
>
> I know that Ansible uses YAML syntax files, not "Ansible format".
> Looking thru the docs, there are several documents
I have 10 files with a play each. In total these plays provision 4 hosts. I
have written a function in bash that takes as an argument the host I want
to provision and calls ansible with all 10 playbooks and a `-l`(limit)
parameter for only the host I provided. I can pass multiple hosts too.
So,
On Tue, 27 Aug 2019 12:44:15 -0700 (PDT)
Cade Lambert wrote:
> [...]
> "output": {
> "json": {
> "results": [
> {
> "name": "item1"
> "id": "26"
> }
> {
> "name": "item2"
No plans, it will work but in the odd case it doesn’t you won’t get any help
from GitHub unless you ca replicate it on an actual Linux platform.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receivin
On 27.08.2019 21:44, Cade Lambert wrote:
> I'm trying to register the value of a JSON object only when another JSON
> object is equal to a certain value, but I just can't figure out how I'd do
> that.
>
> For example, this is my JSON output which is registered in the variable
> results_var:
>
> "
Thanks Kai, That worked.
On Tuesday, August 27, 2019 at 2:10:20 PM UTC-5, JP-OKC wrote:
>
> how can I pull a string from the stdout and use it for failed_when?I
> run a command on a switch and then I want to match a string w/in that
> output to determine if it failed or not.
>
> Here's wha
I'm trying to register the value of a JSON object only when another JSON
object is equal to a certain value, but I just can't figure out how I'd do
that.
For example, this is my JSON output which is registered in the variable
results_var:
"output": {
"json": {
"results": [
Thanks for the reply Jonathan. Much appreciated.
Is there an official answer out there publicly, or someone who can confirm
in the product group?
J
On Mon, Aug 26, 2019, 13:57 Jonathan Lozada De La Matta
wrote:
> someone else can answer officially but, as far as I know there is no plan
> to s
On 27.08.2019 21:10, JP-OKC wrote:
> how can I pull a string from the stdout and use it for failed_when?I
> run a command on a switch and then I want to match a string w/in that
> output to determine if it failed or not.
>
> Here's what the playbook looks like:
>
> ---
> - name: Check the ssh
how can I pull a string from the stdout and use it for failed_when?I
run a command on a switch and then I want to match a string w/in that
output to determine if it failed or not.
Here's what the playbook looks like:
---
- name: Check the ssh keypair on a Nexus 9k
hosts: all
gather_fact
On 27.08.2019 20:17, Gilson Soares [GM] wrote:
> I'm new using Ansible but I'd like to start using best practices.
IMHO it's no best practice to fit all, it all comes down to what's best for you.
> I know that Ansible uses YAML syntax files, not "Ansible format".
Well, that's not entirely corre
I'm new using Ansible but I'd like to start using best practices.
I know that Ansible uses YAML syntax files, not "Ansible format".
Looking thru the docs, there are several documents using interchangeably
YML and YAML.
For example: using ansible_playbook , *must* include the
extension.
What a
What you are looking for is the set_fact module. This allows you to set a
variable in the current context which will allow you to use it in the
subsequent tasks in the play.
On Tuesday, August 27, 2019 at 3:42:28 PM UTC+2, scorp123 wrote:
>
> I want to roll out the latest Virtualbox onto my Ubun
That worked thank you very much!
On Tuesday, August 27, 2019 at 10:29:28 AM UTC-5, Michael M wrote:
>
> Jeffrey,
>
> Try:
>
> when: ansible_distribution_major_version == '7'
>
> On Tue, Aug 27, 2019 at 8:07 AM Jeffrey Agnitsch
> > wrote:
> >
> > I am trying to copy over .rpm files based on t
> - set_fact:
> cisco_ios: "{{ cisco_ios.interfaces|combine(interfaces) }}"
Errata:
- set_fact:
cisco_ios: "{{ cisco_ios|combine({'interfaces': interfaces}) }}"
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To un
Jeffrey,
Try:
when: ansible_distribution_major_version == '7'
On Tue, Aug 27, 2019 at 8:07 AM Jeffrey Agnitsch
wrote:
>
> I am trying to copy over .rpm files based on the major version of the
> operating system I believe I am referencing the ansible_facts part
> incorrectly does anyone have a
On Tue, 27 Aug 2019 07:44:24 -0700 (PDT)
Spiro Mitsialis wrote:
> I have the following that is not working.
>
> vars:
> cmdb: xkjsdflkjsjdl4d
> cisco_ios:
>interfaces:
> gigabit1/0/1:
> name: Gigabit1/0/1
> status: up
> gigabit1/0/2:
I am trying to copy over .rpm files based on the major version of the
operating system I believe I am referencing the ansible_facts part
incorrectly does anyone have an example of the right way?
tasks:
- name: Copy kernel RHEL6
copy:
src:
/etc/ansible/files/individual_files/te
I have the following that is not working.
vars:
cmdb: xkjsdflkjsjdl4d
cisco_ios:
interfaces:
gigabit1/0/1:
name: Gigabit1/0/1
status: up
gigabit1/0/2:
name: Gigabit1/0/2
status: down
tasks:
- name: Test in loo
I want to roll out the latest Virtualbox onto my Ubuntu 18.04 servers via
ansible. What I've managed so far is an installer-script that gets copied
over to any host in the "virtualbox" hosts group (as per ansible hosts
configuration file), then gets remotely executed and does this job. While
th
I am working on a set of playbooks for a hitachi storage automation.
They utilize a cmrest server, that manages the connection to each storage
array. So all of the tasks are ran on the localhost to the same url base,
but there is a var in the path that indicates what storage array to run
a
Anyone has something to say about this subject?
Is playing with Powershell and the GPO comes to the same as playing to the
registry directly?
I need to create policies, and Powershell does not seem to be the answer, as
not super versatile for GPOs with the cmdlet.
Anyone has more insights on t
I got this figured out. I needed to add a step before, to create a list
with all the values , then find the max of it.
On Monday, August 26, 2019 at 12:42:47 PM UTC-5, Nicholas Britton wrote:
>
> Thank you, that has helped alot.
>
> I was looking at the max option:
>
> - name: debug - show
We have a Red Hat RHV setup that uses NFS for its storage. We are moving
to a Red Hat Hyperconverged solution that uses GlusterFS for its storage.
We have a Data domain called Migrate that we use to move the VM disks from
the NFS storage domain to this NFS migrate domain.
What we'd like to do
Hi Vinoth,
Thanks, your recommendation is work.
On Tue, Aug 27, 2019 at 9:10 AM vinoth kumar wrote:
> Hi
> remove hostvars[host].ansible_hostname and try with
> hostvars[host].ansible_facts.hostname if you are doing it from setup module
> or gayher_facts
>
> If it’s not fixed put your playbook
Hi
remove hostvars[host].ansible_hostname and try with
hostvars[host].ansible_facts.hostname if you are doing it from setup module
or gayher_facts
If it’s not fixed put your playbook here
On Tue, 27 Aug 2019 at 5:36 PM, Rafael Tomelin
wrote:
>
> Hi,
>
> I have an inventory with groups this conf
Hi,
I have an inventory with groups this configuration the DB Servers:
[db]
192.168.0.1
192.168.0.2
192.168.0.3
I want to do loop the groups and get variable ipaddress in template.j2. My
loop is:
{% for host in groups['db'] -%}
hostall postgres {{ hostvars[host].ansible_hos
I have this code in my playbook:
- hosts: standby
remote_user: root
tasks:
- name: replace hostname in config
replace:
path: /opt/agentd.conf
regexp: #\s+Hostname\=
replace: Hostname={{hname}}
backup: yes
- name: add database array in files
lineinfile:
39 matches
Mail list logo