[ansible-project] Ansible Operation output diffrent result with “with_sequence” and “debug module”

2020-03-17 Thread 이승준
*My playbook sample :* - name: Memory check debug: msg='{% if "{{ item }} percent" in HOST_MGMT4.stdout %} MEMORY CHECK {% else %} MEMORY OK {% endif %}' register: result_memory with_sequence: '60-100' *Output result :* ok: [EX4200] => (item=60) => { "msg": " MEMORY OK " } ok: [QFX5100]

Re: [ansible-project] Ansible - errno 101 network is unreachable

2020-03-17 Thread Santhosh Ganesan
The actual ansible error is <172.28.158.115> (1, b'\r\n{"msg": "Failed to download packages: Cannot download 7.6.1/elasticsearch-7.6.1-x86_64.rpm: All mirrors were tried", "results": [], "failed": true, "exception": " File

Re: [ansible-project] Ansible - errno 101 network is unreachable

2020-03-17 Thread Santhosh Ganesan
Hi Nick, I did add the proxy to the vars in elk-playbook.yml , Accessing through ansible only fails The below is my ansible section, where am doing the test --- - include_tasks: setup-RedHat.yml when: ansible_os_family == 'RedHat' - include_tasks: setup-Debian.yml when: ansible_os_family

Re: [ansible-project] Ansible - errno 101 network is unreachable

2020-03-17 Thread Nick Venenga
It sounds like you require a network proxy but haven't configured dnf to use it correctly. See https://unix.stackexchange.com/a/436562/249351 On Tuesday, March 17, 2020 at 7:20:54 PM UTC-4, Santhosh Ganesan wrote: > > anyhow newbie communication makes bad, > > tried setting up a new vm tried a

Re: [ansible-project] Ansible - errno 101 network is unreachable

2020-03-17 Thread Santhosh Ganesan
anyhow newbie communication makes bad, tried setting up a new vm tried a fresh ansible-playbook run on the vm, still getting the same error dunno where it falls On Wednesday, March 18, 2020 at 9:26:06 AM UTC+11, Dick Visser wrote: > > I'm not going to waste more of my time by having

Re: [ansible-project] OS support contribution guidelines

2020-03-17 Thread Nick Venenga
Sure, it'd be an astronomical amount of work to fully support Windows. That's definitely not going to happen in a single PR. As you mention > it would be fantastic if we could ever get Ansible as a controller working on Windows but the practical realities is that this won't happen anytime soon

[ansible-project] Re: Run one simples playbook with roles.

2020-03-17 Thread Marcelo Garcia Palma
The project can by found here https://github.com/marcelop3251/Ansible-with-Java -- 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] Run one simples playbook with roles.

2020-03-17 Thread Marcelo Garcia Palma
Hi guys! I'm need someone help me. I am new at world of ansible, then I create one sample for learning more, but I have a problem with roles. I have two roles one myql and one webserver, I did the struture correctly, but when I exec the playbook it not exec the tasks at role webserver. I

Re: [ansible-project] ansible privilege escalation ( sudo su - )

2020-03-17 Thread Dick Visser
On Tue, 17 Mar 2020 at 21:00, Suresh R wrote: > > can you provide the correct method for my situation ? Probably - but only if you provide the details how privilege escalation is configured on your target host. -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] Ansible - errno 101 network is unreachable

2020-03-17 Thread Dick Visser
I'm not going to waste more of my time by having information spoon fed like this. We're done. On Tue, 17 Mar 2020 at 22:52, Santhosh Ganesan wrote: > > followed few help from this link > https://access.redhat.com/discussions/4222851#comment-1751291 like dnf > upgrade -y --releasever=8 > >

Re: [ansible-project] OS support contribution guidelines

2020-03-17 Thread Jordan Borean
> > Windows could be supported if someone did the work I think you are underestimating how much work this would actually require. The biggest (but not the only) issue is that Ansible uses fork in it's worker model and fork is not available on Windows. Changing that to use threads is

Re: [ansible-project] OS support contribution guidelines

2020-03-17 Thread Nick Venenga
Obviously Windows isn't supported as a control host since it doesn't work. This has nothing to do with contribution guidelines. Windows could be supported if someone did the work but it sounds like that would be rejected regardless. This is confusing because there's nothing explicitly calling

Re: [ansible-project] Ansible - errno 101 network is unreachable

2020-03-17 Thread Santhosh Ganesan
followed few help from this link https://access.redhat.com/discussions/4222851#comment-1751291 like dnf upgrade -y --releasever=8 after that on first run of ansible-playbook -vvv --flush-cache elk-playbook.yml Escalation succeeded <172.28.158.118> (1, b'\r\n{"msg": "Failed to download

Re: [ansible-project] Ansible - errno 101 network is unreachable

2020-03-17 Thread Santhosh Ganesan
--- - hosts: all become: yes tasks: - ping: - include_role: name: doe.elasticsearch I hope this helps On Tue, Mar 17, 2020 at 6:51 PM Dick Visser wrote: > Hii > > On Mon, 16 Mar 2020 at 22:51, Santhosh Ganesan wrote: > > > elk-playbook has two tasks, > > ping and include role tes.elasticsearch

Re: [ansible-project] OS support contribution guidelines

2020-03-17 Thread Matt Martz
This is documented at https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#control-node-requirements > This includes Red Hat, Debian, CentOS, macOS, any of the BSDs, and so on. Windows is not supported for the control node. Windows is only supported as the OS for

Re: [ansible-project] OS support contribution guidelines

2020-03-17 Thread James Cassell
On Tue, Mar 17, 2020, at 4:03 PM, Nick Venenga wrote: > What host operating systems does Ansible accept PRs for? I got hit with > a hard no here > https://github.com/ansible/ansible/pull/65381#issuecomment-600250171 > that sounds like anything Windows related it out of the question. I see >

Re: [ansible-project] Using a variable inside reference

2020-03-17 Thread Vladimir Botka
On Tue, 17 Mar 2020 12:21:25 -0700 (PDT) Jason Bullen wrote: > file dev.yml > dev: > accesspolicies: > - policy1 > - policy2 > > file prod.yml > prod: > accesspolicies: > - policy1 > > [...] > vars_prompt: > - name: env > prompt: "Environment" > tasks: > - include_vars:

[ansible-project] OS support contribution guidelines

2020-03-17 Thread Nick Venenga
What host operating systems does Ansible accept PRs for? I got hit with a hard no here https://github.com/ansible/ansible/pull/65381#issuecomment-600250171 that sounds like anything Windows related it out of the question. I see various vague references to reserving the right to only support

Re: [ansible-project] ansible privilege escalation ( sudo su - )

2020-03-17 Thread Suresh R
can you provide the correct method for my situation ? On Thursday, 12 March 2020 13:38:50 UTC+5:30, Dick Visser wrote: > > You manually use sudo but the in your playbook you use su? > > Please read again carefully > https://docs.ansible.com/ansible/latest/user_guide/become.html > > > > On Thu,

[ansible-project] ansible windows inventory get hostname/user/password ad-hoc from external script

2020-03-17 Thread Gregory Storme
Hi, We have a couple of hundred Windows hosts, with each host having different credentials (both login and password), which are stored in an on-premise, in-house developed "vault" system. A dream scenario would be to install win32-openssh on all of them, and use ssh key authentication :)

[ansible-project] Using a variable inside reference

2020-03-17 Thread Jason Bullen
I have 2 var files with a top level of dev and prod. All sublevels are the same. For example: dev: accesspolicies: - policy1 - policy 2 and prod: accesspolicies: - policy1 There is a problem that i keep running into where my design requires a var_prompt input to be used to

Re: [ansible-project] Ansible installation on Puppy Linux

2020-03-17 Thread Stefan Hornburg (Racke)
On 3/17/20 2:54 PM, Saurabh Chaudhary wrote: > tried $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py > > $ python get-pip.py --user > > but below command doesn't work on puppy linux > > pip install --user ansible > Hard to believe without any output indicating that (*rolling

Re: [ansible-project] Ansible installation on Puppy Linux

2020-03-17 Thread Saurabh Chaudhary
tried $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py $ python get-pip.py --user but below command doesn't work on puppy linux pip install --user ansible On Tuesday, March 17, 2020 at 7:06:16 PM UTC+5:30, Stefan Hornburg (Racke) wrote: > > On 3/17/20 1:52 PM, Saurabh Chaudhary

Re: [ansible-project] Ansible installation on Puppy Linux

2020-03-17 Thread Stefan Hornburg (Racke)
On 3/17/20 1:52 PM, Saurabh Chaudhary wrote: > Hi All  > > Can u please help me to install ansible on puppy linux . At PPM i can find > very older version of Ansible . Did you check the installation guide from the Ansible documentation? pip comes to my mind ... Regards Racke > >

[ansible-project] Re: passing variable in another playbook

2020-03-17 Thread Gomathi Selvi Srinivasan
You can use a global playbook, where you can import the 2 playbooks across which you want to use the variable. Something like this - import_playbook: play1.yaml - import_playbook:play2.yaml. play2 can use the variables from play1 and vice versa. You can run the global playbook. On Tuesday,

[ansible-project] Ansible installation on Puppy Linux

2020-03-17 Thread Saurabh Chaudhary
Hi All Can u please help me to install ansible on puppy linux . At PPM i can find very older version of Ansible . -- 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

Re: [ansible-project] Re: Running a task on multi groups using when

2020-03-17 Thread Stefan Hornburg (Racke)
On 3/17/20 11:04 AM, דודו דודו wrote: > I have a partial success that I can not figure what is the problem. > I have 2 tasks, one not in group and the other in group  > > The first task is running as required, the second task is skipping all groups > - Can not understand why  > > - name:

[ansible-project] Re: Running a task on multi groups using when

2020-03-17 Thread דודו דודו
I have a partial success that I can not figure what is the problem. I have 2 tasks, one not in group and the other in group The first task is running as required, the second task is skipping all groups - Can not understand why - name: install java-11-openjdk' packages yum: name:

[ansible-project] Ansible ignore aws_ec2 inventory plugin

2020-03-17 Thread wagaboond
Hello, i'm trying to get instance information, but my inventory has ignored by ansible\ec2 modules. /etc/ansible/ansible.cfg [inventory] # enable inventory plugins, default: 'host_list', 'script', 'auto', 'yaml', 'ini', 'toml' #enable_plugins = host_list, virtualbox, yaml, constructed

Re: [ansible-project] Ansible - errno 101 network is unreachable

2020-03-17 Thread Dick Visser
Hii On Mon, 16 Mar 2020 at 22:51, Santhosh Ganesan wrote: > elk-playbook has two tasks, > ping and include role tes.elasticsearch This is still not enough information to work with. Post the *actual* playbook - not a one line human interpretation of it. -- Dick Visser Trust & Identity

Re: [ansible-project] Getting command not found when executing using shell module

2020-03-17 Thread Stefan Hornburg (Racke)
On 3/17/20 8:05 AM, Shifa Shaikh wrote: > Here is my playbook: > > cat test.yml > > | > -name:Play2 >   hosts:targetserver >   tasks: > >     -copy:src=./centosscript.sh dest=~mode=775 >     -shell:~/centosscript.sh > | > > > Here is my shell script: > > cat centosscript.sh > | > #/bin/ksh >

[ansible-project] Re: Running a task on multi groups using when

2020-03-17 Thread Albert Short
This is one option I have used in the past On Tuesday, 17 March 2020 08:33:46 UTC+2, דודו דודו wrote: > > HI, > > I have a task that runs only on servers that are under Kafka group. How > can i run the task on Kafka and Webserver groups only. > > Thanks > > - name: install java-8-openjdk'

[ansible-project] getting command not found error when using ansible shell module to execute shell script.

2020-03-17 Thread Shifa Shaikh
Here is my playbook: cat test.yml - name: Play 2 hosts: targetserver tasks: - copy: src=./centosscript.sh dest=~ mode=775 - shell: ~/centosscript.sh Here is my shell script: cat centosscript.sh #/bin/ksh grabip=`ip r | grep kernel` I also tried grabip=`ifconfig | grep inet`

[ansible-project] Getting command not found when executing using shell module

2020-03-17 Thread Shifa Shaikh
Here is my playbook: cat test.yml - name: Play 2 hosts: targetserver tasks: - copy: src=./centosscript.sh dest=~ mode=775 - shell: ~/centosscript.sh Here is my shell script: cat centosscript.sh #/bin/ksh grabip=`ip r | grep kernel` I also tried grabip=`ifconfig | grep inet`

[ansible-project] Running a task on multi groups using when

2020-03-17 Thread דודו דודו
HI, I have a task that runs only on servers that are under Kafka group. How can i run the task on Kafka and Webserver groups only. Thanks - name: install java-8-openjdk' packages yum: name: ['java-1.8.0-openjdk'] state: latest when: "'kafka' in group_names" -- You received

[ansible-project] Re: passing variable in another playbook

2020-03-17 Thread mahesh g o
newbie to ansible On Tuesday, 17 March 2020 10:30:30 UTC+5:30, mahesh g o wrote: > > i have created the list using set_fact and i want use this list in > another playbook. > i have stored the value in the ouput. > how do i use it in another playbook?? > > tasks: > > - name: Initialize an