On Thu, 5 Mar 2020 22:09:49 -0800 (PST)
דודו דודו wrote:
> I have a task that create a folder on HDFS storage.
> If the folder exists I wish to show a message
>
> - hosts: gw
> become: true
> become_user: hdfs
> tasks:
>- name: create folder in HDFS
> shell: hadoop dfs -mkdir
HI,
I have a task that create a folder on HDFS storage.
If the folder exists I wish to show a message
- hosts: gw
become: true
become_user: hdfs
tasks:
- name: create folder in HDFS
shell: hadoop dfs -mkdir /tmp/dudu
ignore_errors: yes
register: result
when:
Hi JYL,
Here is what i mean.
TASK [debug]
***
ok: [192.168.56.50] => (item= 00:48:30 up 2 min, 1 user, load average:
0.05, 0.06, 0.03) => {
"msg": "
Experts Hi,
I have a variable file that has a set of flowers, colors, and countries.
# cat vars/DASHBOARD_vars.yaml
---
myarch:
- COLOR:
name: blue,white,black,green
- FLOWER:
name: rose,jasmine
- COUNTRY:
name: Japan,Germany,France
I wish to create one HTML file each,
Jordan,
The methodology I was following was "if it worked through ise, why's this not
pass it properly?", I knew I was doing something wrong, I just didn't know what
yet.
I'll give this a shot in the morning and report back.
After 12 punches on the card of "Jordan saves the day" do you earn a
Hi all- we're happy to announce that the general release of Ansible 2.8.10
is
now available!
How do you get it?
--
$ pip install ansible==2.8.10 --user
The tar.gz of the release can be found here:
* 2.8.10
https://releases.ansible.com/ansible/ansible-2.8.10.tar.gz
SHA256:
When you call powershell.exe with -File you cannot run multiple commands
after that, it's designed to run a script with potential arguments. You can
even see in the error from powershell it thinks the file it needs to run is
`C:\Scripts\USERNAME\dfsadd_func.ps1;' (with the semicolon) so that's
On 05.03.2020 15:52, David Foley wrote:
Have the Following Playbook Which Returns the following
ok: [localhost] => {
"mdb.json": [
The [ is telling us that mdb.json is a list, the fist element in a list
i 0.
{
"mac-address": "xx:xx:xx:xx:xx"
}
]
}
On 04.03.2020 22:34, Stephen Gevers wrote:
I still haven't figured out why this justifies the developer's
conclusion.
Because it has nothing to do with Ansible and everything to do with your
OS and network protocol you are using to your NAS.
Ansible just ask the OS and report the answer it
I was able to figure it out. I just had to think about it a bit more:
- name: Extract Errors
lineinfile:
line: "{{ item.ErrorMessage }}"
path: "{{ error_log }}"
insertafter: EOF
create: yes
state: present
loop: "{{ csv_content.list }}"
when: item.Host is
I need to create a file based on the output of the csv_content variable.
Specifically I want to extract the ErrorMessage only, but the caveat is
that I want only the errors associated with ansible_hostname. That way on
each server I am extracting only the ErrorMessages that are relevant to
I'm trying to create a policy rule using a loop to add multiple rules. I'm
getting an error and I have tried several scenarios but can't figure out.
here's what I have.
Here are the vars:
rules:
A3-JL1L-test.local:
- rl_name: test.local
actions:
- type: forward
On 03.03.2020 11:53, Quentin Aveno wrote:
I think it's not possible
Correct.
--
Kai Stian Olstad
--
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
I have a function, it works perfectly if I run it directly from my target
server.
powershell.exe -ExecutionPolicy ByPass -file
"C:\Scripts\USERNAME\dfsadd_func.ps1"; dfsadd -junction Apps -obj_name
toast -prd_vserver PROD -dr_vserver DR -prd_state online -dr_state offline
With success seen
I am using the following. Not sure if there is a better solution:
- name: Gather error reports in background
shell: |
while read line; do
grep -i "$line" "{{ log_source }}"* | uniq > "{{ dest_dir
}}/{{ ansible_hostname }}-$line.txt"
done < "{{ error_log }}"
Hi Racke ,
I moved the script to /tmp directory and also changed permission to 777.
In the playbook I just put:
- name: testing
script: /tmp/shell.sh
The virtual machine is created with success and I figured out that the
shell script is executed with success but in the localhost
Experts Hi,
I have a variable file that has a set of flowers, colors, and countries.
# cat vars/DASHBOARD_vars.yaml
---
myarch:
- name: brown,white,black,green
- name: rose,jasmine
- name: Japan,Germany,France
I wish to create one HTML file each, thus 1 HTML for all colors, 1 HTML
I have a task that searches logs for specific errors in various logs (up to
7 days worth of logs). When searching through just one log I never had an
issue, but when searching through the 7 logs (used a wildcard to accomplish
this), sometimes Ansible goes to lunch and doesn't recover. It just
Ok, try this then:
- debug:
msg: "{{ item.mac-address }}"
loop: "{{ mdb.json }}"
On Thursday, March 5, 2020 at 10:45:03 AM UTC-5, David Foley wrote:
>
> -
> - hosts: localhost
> gather_facts: false
> tasks:
> - name: Getting Mac Address
> uri:
> url: http://.com
>
-
- hosts: localhost
gather_facts: false
tasks:
- name: Getting Mac Address
uri:
url: http://.com
return_content: yes
register: mdb
- debug:
msg: "{{ mdb.json }}"
--
You received this message because you are subscribed to the Google Groups
"Ansible
What's your plabook look like? You'll probably have to loop through your
JSON results as it looks like it's a list.
On Thursday, March 5, 2020 at 10:34:40 AM UTC-5, David Foley wrote:
>
> When i do Both
>
> "{{ mdb.json.mac-address }}"
> "{{ mdb.json.split(':')[1:6] | join(':') }}"
>
> It
When i do Both
"{{ mdb.json.mac-address }}"
"{{ mdb.json.split(':')[1:6] | join(':') }}"
It returns
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an
undefined variable. The error was: 'list object' has no attribute
'mac'\n\nThe error appears to be in
Something like this would work I believe:
"{{ mdb.json.split(':')[1:6] | join(':') }}"
Also, could you not just reference it directly by using "{{
mdb.json.mac-address }}"?
On Thursday, March 5, 2020 at 9:52:52 AM UTC-5, David Foley wrote:
>
> Have the Following Playbook Which Returns the
Circling back around to this. What do you mean by crawlers? Any you'd
recommend.
I did notice the URI module can pass credentials to a site, but when I try
that it works with any credentials, even non-existent or incorrect
credentials, so I'm not totally sure what that is actually doing
Have the Following Playbook Which Returns the following
ok: [localhost] => {
"mdb.json": [
{
"mac-address": "xx:xx:xx:xx:xx"
}
]
}
--
- hosts: localhost
gather_facts: false
tasks:
- name: Getting Mac Address
uri: url="http://.com?field=mac-address;
i think you will have to provide the path using vars_files in the playbook
and then run.
On Wed, Mar 4, 2020 at 9:09 PM Vishal Bobade
wrote:
> @sagarmujumale - any idea on this?
>
> On Wednesday, March 4, 2020 at 7:19:44 PM UTC+5:30, Vishal Bobade wrote:
>>
>>
>> TASK [ansible-manage-lvm :
On 3/5/20 2:14 PM, Julio Cesar Caraca wrote:
> Hi Racke,
>
> Thanks for the answer!
>
> All configuration that I´ve been trying is based on this documentation:
> https://docs.ansible.com/ansible/latest/modules/shell_module.html
>
> Although I´m getting error the virtual machine is been created
Hi Racke,
Thanks for the answer!
All configuration that I´ve been trying is based on this documentation:
https://docs.ansible.com/ansible/latest/modules/shell_module.html
Although I´m getting error the virtual machine is been created but without
the copy and execution of shell script:
[image:
Hi all- we're happy to announce that the general release of Ansible 2.9.6
and
2.8.9 are now available!
How do you get it?
--
$ pip install ansible==2.9.6 --user
or
$ pip install ansible==2.8.9 --user
The tar.gz of the releases can be found here:
* 2.9.6
29 matches
Mail list logo