Hi all,
I have a rpm whcich i have added in a list. I want to make it dynamic i.e
when the version of rpm changes playbook should handle it.
I have build a logic but the playbook skips the task where i have mentioned
the regex. Kindly help me .
- hosts: localhost
tasks:
- name: Create a
On Thu, 23 Jan 2020 16:03:36 -0800 (PST)
Nicholas Yue wrote:
> - debug: msg="{{ item.stdout_lines }}"
> with_items: "{{ out.results }}"
>
> I am unable to print out just the output results in stdout_lines, it
> prints out other information which I'd like to suppress
Use 'loop_control'
Hello Guys,
can someone please explain about "undefined" error
Task
- name: reboot if required
win_reboot:
when: update_count.reboot_required
TASK [reboot if required]
*Thank you, it worked*
On Thursday, January 23, 2020 at 12:24:04 PM UTC-8, Jordan Borean wrote:
>
> Then finally for your last message, I've already told you in
> https://groups.google.com/forum/#!topic/ansible-project/ME6fY1n7SCA why
> it's failing the reboot check.
>
> Firstly
>
>1. The
it took half an hour to run it and it's working normally now. Was it a BUG?
On Thursday, January 23, 2020 at 4:33:06 PM UTC-8, Work-Hard wrote:
>
> *Hello guys,*
> *My playbook seems to be stuck for 5 mins for 1 server. Is it bug ?*
> tasks:
>- name: Search and download Windows updates
*Hello guys,*
*My playbook seems to be stuck for 5 mins for 1 server. Is it bug ?*
tasks:
- name: Search and download Windows updates without installing them
win_updates:
category_names:
- SecurityUpdates
- CriticalUpdates
- UpdateRollups
-
Hi,
I have the following ansible script
$ cat generated-head-node.yaml
- hosts: all
tasks:
- name: Run multiple commands
command: "{{item}}"
with_items:
- pwd
- ls
register: out
- debug: msg="{{ item.stdout_lines }}"
with_items: "{{ out.results }}"
I am
Creating a second post hours after your first simply pointing back at it
might not be the best way to get help. Just for future reference.
On Thursday, January 23, 2020 at 1:45:06 PM UTC-6, Work-Hard wrote:
>
> Any updates on this, please help on my POST?
>
Then finally for your last message, I've already told you in
https://groups.google.com/forum/#!topic/ansible-project/ME6fY1n7SCA why
it's failing the reboot check.
Firstly
1. The reboot option in win_updates is 'reboot: yes', not 'win_reboot:
yes', you would know that if you had read
The filtered message says it's filtered due to category_names, here are the
categories you've applied in one of your tasks
- Upgrades
- Security Updates
When you omit the category_names here are the categories it uses by default
(as per the docs)
- CriticalUpdates (same as "Critical
Based on that message it appears that a reboot is requried before you can
install the patches. The win_updates module is not going to reboot the
host after changes if it doesnt make any changes. Reboot the host
manually, then try running again and I bet it goes. Otherwise you could
probably
I have tried multiple machines to download the updates but it's not
working.
*Playbook*
* tasks:*
* - name: Search and download Windows updates without installing them*
* win_updates:*
* state: downloaded*
* win_reboot: true*
*Throwing error - *
fatal:
since it works for other hosts, the problem is related to that specific
host, not ansible.
There may be many reasons why it doesn't work.
Since ansible is just an automation tool, best to try an troubleshoot
things manually on that host.
On Thu, 23 Jan 2020 at 18:46, Work Email wrote:
> *KB
Any updates on this, please help on my POST?
https://groups.google.com/forum/#!topic/ansible-project/vVYN7qsRn7U
--
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
On Thu, 23 Jan 2020 10:54:52 -0800 (PST)
jean-christophe manciot wrote:
> loop: "{{ list|
> selectattr('key3', 'regex', 'regex1|regex2|regex3')|
> list }}"
> [...]
> For instance, if I need to add another constraint like another attribute
> must match
Racke, thank you very much. Changing 'command' to 'shell' fixed the
problem. One follow-up... I thought ssh-keyscan *was* fetching the SSH key
file from the server. Was I mistaken? What technique were you thinking
of? Thanks again!
On Wednesday, January 22, 2020 at 10:32:04 PM UTC-8,
fantastic! :-)
My real use case is little more complex:
1. there are other attributes like "key1" or similar to "list" (within
top-level "list") which must be taken into account
2. the regex filter on "key3" is a little more complex (a list of
logical OR)
I tried to to implement
*KB number upgrades/ security patches are not installing?*
*Playbook*
tasks:
- name: Install all security, critical, and rollup updates without a
scheduled task
win_updates:
category_names:
- Upgrades
- SecurityUpdates
whitelist:
- KB4494452
-
You cannot import a playbook anywhere inside a play - importing a playbook is a
play of its own.
If you want to run the imported playbook first, try:
- name: this play runs ‘another.yml' on the hosts it defines
import_playbook: another.yml
- name: this play runs two roles on all hosts in
> > There are two options for that string:
> > 1. qos-nested-50 will be set when bandwidth_mb is 50.
> > 2. qos-nested-new-20. 20 for example will set the string to qos-nested-new-
> > when bandwidth_mb is not 50.
It's possible to use the 'ternary' filter. For example
- set_fact:
On Thu, 23 Jan 2020 06:22:37 -0800 (PST)
Yehuda Pinhas wrote:
> qos_policy: "{{ 'qos-nested-' + bandwidth_mb }}"
> [...]
> **
>
> ERROR! Syntax Error while loading YAML. did not find
On 1/23/20 3:22 PM, Yehuda Pinhas wrote:
> *Hi!*
> *I want to make the variable qos_policy set on conditional basis:*
> *
> *
> *If bandwidth_mb == '50'*
> * then qos_policy == 'qos-nested-50'*
> *
> *
> *else*
> * qos_policy == 'qos-nested-new-50'*
> *
> *
> *
> *
> *My code is this (not
*Hi!*
*I want to make the variable qos_policy set on conditional basis:*
*If bandwidth_mb == '50'*
* then qos_policy == 'qos-nested-50'*
*else*
* qos_policy == 'qos-nested-new-50'*
*My code is this (not working):*
qos_policy: "{{ 'qos-nested-new-' + bandwidth_mb }}"
qos_policy: "{{
*Hi!*
*I want to make the variable qos_policy set on conditional basis:*
*If bandwidth_mb == '50'*
* then qos_policy == 'qos-nested-'*
*else*
* qos_policy == 'qos-nested-new-'*
*My code is this (not working):*
qos_policy: "{{ 'qos-nested-new-' + bandwidth_mb }}"
qos_policy: "{{
Hi all,
using strace on the ansiballz
strace -o st -s -e openat,open,readlink,stat,lstat -f python3.7
/home/mdupont/.ansible/tmp/ansible-tmp-1579783694.3938165-128929969192073/AnsiballZ_sqs_queue.py
Shows
7150 openat(AT_FDCWD, "/etc/boto.cfg", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
such
That's exactly what I need. I really hadn't seen that.
Thanks a lot
On Thursday, January 23, 2020 at 9:24:45 AM UTC+1, Hieronymus wrote:
>
> Hi
>
> I'm using the authorized_key module in my ansible user role.
> As some user aren't ssh key yet, I would like that by default this key is
> not
Just skip the item when ssh_key is not available (`false` in your example):
- name: "add public keys to users"
authorized_key:
user: '{{ item.name }}'
key:'{{ item.ssh_key }}'
with_items: '{{ user }}'
when: item.ssh_key
On Thu, Jan 23, 2020 at 9:25 AM Hieronymus
Use "default" filter:
https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#defaulting-undefined-variables
Example:
- hosts: localhost
gather_facts: no
vars:
d:
key: value
tasks:
- debug:
msg: "{{ d.missing_attr | default('default_value') }}"
On
Hello Team,
I am parsing register value using debug and using when condition to
print particular matching value. While doing that am getting below error.
some of the register value doesn't have "volume_attachments" variable due
to that the when condition is failing. I want to ignore this
Suggestions please.
On Wed, Jan 22, 2020 at 9:43 AM Srinivas Naram
wrote:
> Any suggestions would be greatly appreciated.
>
> On Tue, Jan 21, 2020 at 8:05 PM Srinivas Naram
> wrote:
>
>> Hello Vladimir
>>
>> I have followed exactly same steps mentioned above and I see different
>> errors now.
Hi
I'm using the authorized_key module in my ansible user role.
As some user aren't ssh key yet, I would like that by default this key is
not created and the task escaped.
I've seen that the key string is required by this module.
Is means that I cannot put a false default value?
Here's my main
On Wed, 22 Jan 2020 21:58:14 -0800 (PST)
Rakesh Parida wrote:
> > - hosts: localhost
> > tasks:
> > - name: Create a list
> > set_fact:
> > some_value:
> > - avenger
> > - mk11
> > - witcher
> > - gow
> > -
32 matches
Mail list logo