Re: [ansible-project] Reboot servers strategy.

2020-06-30 Thread John Petro
Are you using ansible to apply updates and reboot now? If so, what does your current process look like? --john On Mon, Jun 29, 2020 at 3:26 PM Rafael Tomelin wrote: > > Hi Guys, > I have periodic updates on all RedHat servers at the same time, I need to > create a strategy to restart my

Re: [ansible-project] Unable to unarchive the openshift client

2020-06-30 Thread Dick Visser
What do your playbook and inventory look like? Which version of ansible are you using? How do you invoke things? On Mon, 29 Jun 2020 at 19:56, Vinay Kumar Rudiya wrote: > If I'm trying to unarchive only the file out of the role I can do it, but > when I'm trying to do in role with the proxy

Re: [ansible-project] Ansible unable to create $HOME/.ansible/tmp directory due to shell syntax error in RHEL 6.7

2020-06-30 Thread Dick Visser
What do your playbook and inventory look like? Which version of ansible are you using? How do you invoke things? What are you trying to automate? On Mon, 29 Jun 2020 at 15:45, Rishabh Kumar wrote: > Hi, > > When I am trying to run ansible job from my host computer to remote server > it fails

Re: [ansible-project] Run Command On Each Host

2020-06-30 Thread Luca 'remix_tj' Lorenzetto
Hello, try this for printing command output. I don't know if you can hide the other parts of output: https://stackoverflow.com/a/24834231 On Tue, Jun 30, 2020 at 4:18 PM 'Jitender J' via Ansible Project wrote: > > Thanks for the update, i''ll try using multiple shell tasks, also can you >

Re: [ansible-project] Run Command On Each Host

2020-06-30 Thread 'Jitender J' via Ansible Project
Thanks for the update, i''ll try using multiple shell tasks, also can you please let me know how to make ansible not to print commands only print output of command On Tue, Jun 30, 2020 at 7:44 PM Luca 'remix_tj' Lorenzetto < lorenzetto.l...@gmail.com> wrote: > Hello, > > ansible by default runs

Re: [ansible-project] Run Command On Each Host

2020-06-30 Thread Luca 'remix_tj' Lorenzetto
Hello, ansible by default runs a task on all hosts and then waits for result from everyone before going to the next step. If your task has a loop, there's no way to run the loop synchronously between all nodes, because is a single task with multiple options. You can split the commands in several

[ansible-project] Run Command On Each Host

2020-06-30 Thread 'Jitender J' via Ansible Project
Hi Team, I want to run multiple commands in shell module, but i want to run 1st command on each hosts than move to next command on each host than third and so on, so that i can get output of same command together from all host at single place, tried with loop (with_item) but no luck, need help

Re: [ansible-project] Re: string not recognised in groups_vars/all

2020-06-30 Thread Srinivas Naram
Check out the syntax of 'all' file. I feel the indentation is not right. On Tue, Jun 30, 2020 at 5:29 PM Johana Galarza Monta wrote: > but that doesnt't respond to my answer on why this works when it is in the > playbook... and not when it is in groups-vars > > On Tuesday, 30 June 2020 12:28:56

[ansible-project] Re: string not recognised in groups_vars/all

2020-06-30 Thread Johana Galarza Monta
but that doesnt't respond to my answer on why this works when it is in the playbook... and not when it is in groups-vars On Tuesday, 30 June 2020 12:28:56 UTC+2, Johana Galarza Monta wrote: > > I have a the below in my groups vars, and in a role I am trying to add a > conditional on `module-a`

[ansible-project] How to break "until" loop when some conditions meet?

2020-06-30 Thread xiang chen
### SUMMARY I need to call one api to get async result, the api result is like { "resultCode": 0, "resultInfo": "cutover is running", "taskStatus": "21" } when taskStatus is 21 means the tasks is running, I should wait and contnue to get the result until the taskStatus becomes 20 that means

[ansible-project] Add Additional Ip Addresses to an interface.

2020-06-30 Thread Paul Robinson
Firstly just to say I'm new to ansible and learning as I go along. I have configure a playbook that clones 3 virtual machines using the following inventory file which has a few custom variables added for my needs ansible-playbook -i vms-to-deploy deploy_sap_vm.yml vms-to-deploy [netweaver]

Re: [ansible-project] string not recognised in groups_vars/all

2020-06-30 Thread Jean-Yves LENHOF
Dot, dash are operators in python on which ansible is based... It is not a good idea to use them, but if you use them, there is some notices about it here : https://docs.ansible.com/ansible/latest/reference_appendices/faq.html And there are issue :

[ansible-project] string not recognised in groups_vars/all

2020-06-30 Thread Johana Galarza Monta
I have a the below in my groups vars, and in a role I am trying to add a conditional on `module-a` such as when: " 'module-a' in module" but keeps throwing me this error {"msg": "The conditional check ' 'module-a' in modules' failed. The error was: error while evaluating conditional (

Re: [ansible-project] Combine dictionaries based on a dictionary key value.

2020-06-30 Thread 'Felix Fontein' via Ansible Project
Hi, a new lookup plugin was proposed for community.general which would help with this: https://github.com/ansible-collections/community.general/pull/263 We're currently trying to evaluate whether this plugin would be useful to the community. Feel free to comment there (or try it out!). Cheers,

Re: [ansible-project] Combine dictionaries based on a dictionary key value.

2020-06-30 Thread Vladimir Botka
On Mon, 29 Jun 2020 13:22:05 -0700 (PDT) Adam McGill wrote: > add the items of net_interface into aggregate_info or > create new dictionary based on key value of node_name. Create dictionaries from the lists - set_fact: agg: "{{ agg|default({})|combine({item.node_name: item}) }}"

Re: [ansible-project] Combine dictionaries based on a dictionary key value.

2020-06-30 Thread Vladimir Botka
On Mon, 29 Jun 2020 13:22:05 -0700 (PDT) Adam McGill wrote: > ... add the items ... based on key value of node_name. > > aggregate_info: [ > { >... >"node_name": "TEST_NA_CLUSTER_01-01", >... > }, > { >... >"node_name": "TEST_NA_CLUSTER_01-02", >... > }] > >