That says around line 232 of your PowerShell script is missing a brace. This is
a syntax issue in your script and not an issue in Ansible.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emai
hi guys! has anyone bumped into the similar issue before?
https://github.com/ansible/ansible/issues/47305
--
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 ansi
Thanks, Jordan. I've already tried that, and here's the return:
fatal: [kcrook10]: FAILED! => {"changed": true, "cmd": "powershell.exe
-ExecutionPolicy Bypass -File C:\\temp\\command_update.ps1 -ConsoleTitle
\"Dell Command | Update\"", "delta": "0:00:00.546000", "end": "2018-10-18
08:24:45.319
Use win_command to call the script like you would locally.
- win_command: powershell.exe -ExecutionPolicy Bypass -File C:\path\to\
script.ps1 -ConsoleTitle "Dell Command | Update"
Thanks
Jordan
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" grou
Finally tracked the issue down to my misunderstanding of how lookup() works.
Answer here:
https://groups.google.com/forum/#!topic/ansible-project/McPi-i-90yU
On Monday, October 15, 2018 at 10:06:00 PM UTC-6, Dmitriy Panteleyev wrote:
>
> I'm a bit confused how variables are defined when using `
Thank you for clearing it up!
On Thursday, October 18, 2018 at 11:54:12 AM UTC-6, Dmitriy Panteleyev
wrote:
>
> I was under the impression that if I define a variable with a `lookup`
> function, it would store the results of the lookup. And then when I used
> that variable, it would spit out
On Thursday, 18 October 2018 19.54.12 CEST Dmitriy Panteleyev wrote:
> I was under the impression that if I define a variable with a `lookup`
> function, it would store the results of the lookup. And then when I used
> that variable, it would spit out the results of the lookup.
>
> However, fro
On Thu, Oct 18, 2018 at 11:56 AM Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:
> On Thursday, 18 October 2018 17.47.02 CEST Leam Hall wrote:
> > Yes, with the note that I actually fixed the handler names to match.
> >
> > # tasks/main.yml
> >
> > - include: install_httpd.yml
> >
> > -
Hello,
I am new to Ansible and would like some feedback, please. I am running
Ansible 2.5.0 and using AWX.
Having some issues running this playbook.
- hosts: "{{ target1 }}"
gather_facts: false
become: true
become_user: webuser
roles:
- r10web/git_pull
- hosts: "{{ target1 }}"
I was under the impression that if I define a variable with a `lookup`
function, it would store the results of the lookup. And then when I used
that variable, it would spit out the results of the lookup.
However, from running a bunch of different test cases that Ansible performs
the lookup eve
I don't believe the ping module will work with any device that cannot run
python
locally. https://docs.ansible.com/ansible/2.5/modules/ping_module.html
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop
On Thursday, 18 October 2018 17.47.02 CEST Leam Hall wrote:
> Yes, with the note that I actually fixed the handler names to match.
>
> # tasks/main.yml
>
> - include: install_httpd.yml
>
> - include: cat1.yml
> when: apache_cat1 | bool
> notify: restart_httpd
include has only ok and failed
I am running RHEL 7.5, Satellite 6.3, Ansible 2.7.0, and Ansible AWX 2.0.1.
I am in the process of developing playbooks to handle our server
provisioning. As part of the provisioning process, we are using sssd and
realmd, to join the servers to our Active Directory tree. The next step in
the pr
On Thu, Oct 18, 2018 at 11:37 AM Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:
> On Thursday, 18 October 2018 16.01.55 CEST Leam Hall wrote:
> > In the ansible output it says:
> >
> > META: ran handlers
>
> This indicates that it run all the handler that was notified so that mean
>
On Thursday, 18 October 2018 16.01.55 CEST Leam Hall wrote:
> In the ansible output it says:
>
> META: ran handlers
This indicates that it run all the handler that was notified so that mean not
necessarily all the handlers.
> For this role handlers/main.yml is:
>
> - name: restart_and_enab
Hi,
I have a playbook that attempts to notify via slack of hosts that were
successful and those that failed. Below is a simply playbook showing what
I'm trying to achieve using debug.
Ansible version: 2.6.5
Playbook ---
- hosts: all
tasks:
-
- replace:
path: my_file
regexp: '(XXX1.*)$\s+'
replace: '\1'
On Thu, 18 Oct 2018 at 09:47, Shlomit Afgin wrote:
>
>
> HI,
> Is there any way to remove from a file, all blank lines that exist after
> line start with specific string?
>
> for example:
>
> Remove all
Hi,
I have a playbook that attempts to notify via slack of hosts that were
successful and those that failed. Below is a simply playbook showing what
I'm trying to achieve using debug.
Ansible version: 2.6.5
Playbook ---
- hosts: all
tasks:
-
Assuming you're using RPM, files that are marked "config" files in the
package will not be overwritten by package upgrades (that's how you
end up with ".rpmnew" files). But if you have missing files you can
file them by looking at the output of "rpm -V". Then think of some
creative way to trigger
As you know some packages install their config files/dir during
the normal package installation (the first examples that popped in my
mind are postfix, bind, and apache). I understand that if the
configuration file I am editing using ansible is different than the
one I providing (as file or t
In the ansible output it says:
META: ran handlers
For this role handlers/main.yml is:
- name: restart_and_enable_httpd
service:
name: httpd
state:restarted
enabled: true
This is Ansible 2.6 on RHEL 6. httpd is installed earlier in the process but at
the end it is not
Hi, all.
I've created a playbook to run a PowerShell script. The script is already
copied to the target system (but also exists on the Ansible server). It
must be run with the following argument:
-ConsoleTitle "Dell Command | Update"
I've tried every module I can think of, with every way to
Hello Aris,
you are trying to define the hosts file like a ini file (with name=value
and group:vars) but you are trying to read like if it's in yaml format.
More information about how to describe in yaml/ini format here =>
https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html
T
I've just found the UUID is avaible in ansible_product_uuid (or facter fact
as 'uuid'). So easy enough if we gather facts from the machine first.
On Wednesday, 17 October 2018 17:18:10 UTC+1, KSS wrote:
>
> Hi,
>
> I'm looking at switching to using the vmware_guest_snapshot module to take
> sna
that's why I asked what state were you using. Can you di a run with extra
verbise?
On Thu, Oct 18, 2018 at 4:54 AM wrote:
> You can use :-
>
> *- name: install the latest version of
> yum:
> name:
> state: **latest*
> OR
>
> *- name: install one specific version of
> yum:
> na
Sorry, I wasn't suggesting you use a sequence! :-) That was just to
illustrate the effect in a small test program.
I was just saying that to get the template re-evaluated you need to use a
loop control that changes. Which you have achieved with a check of stdout.
Regards, K.
On Thu, Oct 18, 2018
четверг, 18 октября 2018 г., 11:34:25 UTC+3 пользователь Karl Auer написал:
>
> Try this:
>
> # Test random filter
> - hosts: localhost
>
> tasks:
> - name: Test random
> set_fact:
> rand_result: "{{ 5 |random }}"
> with_sequence: count=10
>
> Basically the change of item
You can use :-
*- name: install the latest version of
yum:
name:
state: **latest*
OR
*- name: install one specific version of
yum:
name: -2.9.amzn1
state: present*
On Thursday, October 18, 2018 at 7:06:50 AM UTC+5:30, Chad Fay wrote:
>
> I'm new at this, I'm trying to fig
you can write shell script for that and put that code in playbook.
On Thursday, October 18, 2018 at 1:17:03 PM UTC+5:30, Shlomit Afgin wrote:
>
>
> HI,
> Is there any way to remove from a file, all blank lines that exist after
> line start with specific string?
>
> for example:
>
> Remove all b
I think this code is useful for you ,try it.
*- name: "create java.sh file with permissions." file:path:
"/etc/profile.d/java.sh"state: touchmode: 0755- name: "create
java.sh file with content" copy:dest: "/etc/profile.d/java.sh"
content: | export J
in shell i have to write ./install command and it open console installer
for software, but when I perform same activity by Ansible it work in
background with default value.
On Saturday, October 13, 2018 at 10:24:29 PM UTC+5:30, Varun Chopra wrote:
>
> If you can do it through a shell script, you
Try this:
# Test random filter
- hosts: localhost
tasks:
- name: Test random
set_fact:
rand_result: "{{ 5 |random }}"
with_sequence: count=10
Basically the change of item forces a re-evaluation, even though nothing is
changing inside the loop.
However: You may still h
Actually, example without lookup at all:
- name: Test random
set_fact:
rand_result: "{{ 5 | random }}"
until: rand_result == 'NEVER'
retries: 10
delay: 1
If I run ansible in verbose mode I see that on all iterations rand_result
var have the same value, so jinja template evaluated once.
HI,
Is there any way to remove from a file, all blank lines that exist after
line start with specific string?
for example:
Remove all blank lines after lines start with XXX1
XXX1bla bla bla
hjshfgdfg
gdfsgdsgdf
gsdfgd
XXX1 blu bluu blu
dfjgljfd
gfdgds
will be:
XXX1bla bla bla
hjshfgdfg
That sounds like a bug, how do you know for sure it's because it's not
passing -y or not some other issue. Looking at the code '-y' is part of the
base arguments that are always set so I don't think this is your issue
https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/packaging/os
Hi!
I want to wait for some DNS record registered in DNS server. For example, A
record. So I try to use this task:
- name: Wait DNS A record host.example.com registered
set_fact:
lookup_result: "{{ lookup('dig', 'host.example.com.') }}"
until: lookup_result != 'NXDOMAIN'
retries: 20
36 matches
Mail list logo