Re: [ansible-project] How to execute two tasks under a play ?

2019-10-03 Thread Vladimir Botka
On Thu, 3 Oct 2019 05:48:04 -0700 (PDT) Mohtashim S wrote: > - name: Play 4 > hosts: localhost > tasks: >- name: "Load Deployment1." > tags: deploy > include_vars: >file: "{{ item }}" > with_fileglob: >- "vars/App_*.yaml" > > tasks: >- name:

Re: [ansible-project] How to use variables from one task in another task

2019-10-01 Thread Vladimir Botka
On Tue, 1 Oct 2019 18:39:54 +0530 Srinivas Naram wrote: > - debug: > var: hostvars > > shows all the hosts in my inventory file, so I believe my playbook has > access to all hosts. > [...] > I still get following error > [...] > failed. The error was: error while evaluating conditional >

Re: [ansible-project] How to use variables from one task in another task

2019-10-01 Thread Vladimir Botka
> > > > > *Trial1* : > > > > > when: {{hostvars['hostname1]['ansible_facts']['distribution']}} == > > > > > "CentOS" > > > > > > > > Try this one > > > > when: "hostvars['hostname1']['ansible_facts']['distribution'] == > > > > 'CentOS'" > > > > On Tue, 1 Oct 2019 12:41:22 +0530 > > Srinivas

Re: [ansible-project] How to use variables from one task in another task

2019-10-01 Thread Vladimir Botka
> > > *Trial1* : > > > when: {{hostvars['hostname1]['ansible_facts']['distribution']}} == > > > "CentOS" > > > > Try this one > > when: "hostvars['hostname1']['ansible_facts']['distribution'] == > > 'CentOS'" On Tue, 1 Oct 2019 12:41:22 +0530 Srinivas Naram wrote: > I have tried with your

Re: [ansible-project] How to use variables from one task in another task

2019-09-30 Thread Vladimir Botka
On Mon, 30 Sep 2019 20:03:25 +0530 Srinivas Naram wrote: > *Trial1* : > when: {{hostvars['hostname1]['ansible_facts']['distribution']}} == "CentOS" Try this one when: "hostvars['hostname1']['ansible_facts']['distribution'] == 'CentOS'" -- You received this message because you are

Re: [ansible-project] Hello guys, I'm unable to pass a dynamic inventory script to read a yml file from repo

2019-09-26 Thread Vladimir Botka
> > usage: > > > inventory.py [-h] [--sshkey SSHKEY] [--commit > > > COMMIT] url inventory inventory.py: error: too few arguments > > > > Extra variables (-e, --extra-vars) are passed to the play not to the > > dynamic > > inventory script. Create a wrapper for inventory.py with the

Re: [ansible-project] Hello guys, I'm unable to pass a dynamic inventory script to read a yml file from repo

2019-09-26 Thread Vladimir Botka
On Thu, 26 Sep 2019 09:56:26 -0700 (PDT) Bariou Alarou wrote: > I'm able to get the list of my hosts from the yml file when running this > command > $ /opt/ansible/static/inventory/inventory.py > https://github.com/adeyeri88/test.git staging.yml > [...] > But when I'm trying now to run any

Re: [ansible-project] Cannot use signature-based authentication because pyopenssl is not available

2019-09-24 Thread Vladimir Botka
On Wed, 25 Sep 2019 05:58:08 +0200 Dick Visser wrote: > Your ansible is using python2. > So either install ansible using python3, or install pyopenssl for python2 > (if that’s possible at all, can’t tell from here). > > On Wed, 25 Sep 2019 at 01:23, Antien Ho wrote: > > environment: windows 10

Re: [ansible-project] traversing directory structure

2019-09-24 Thread Vladimir Botka
On Tue, 24 Sep 2019 12:57:35 -0700 (PDT) Gregory Edigarov wrote: > hello, > > let's look at the following structure: > var/ > ssh/ >user1 >user2 >user3 > > hosts/ >host1/ > user1 > user3 > > host2/ >user2 >user3 > > under /var/ssh there are public

Re: [ansible-project] Issues generating dynamic host in Ansible loop.

2019-09-24 Thread Vladimir Botka
On Mon, 23 Sep 2019 23:44:58 -0700 (PDT) Mohtashim S wrote: > command_result variable has has data like below. > > host6,host5\targ3 > host4,host3\targ1 > host1,host2,host5\targ2 > . > . > > I need to loop through each line of command_result. Pick the host list for > example

Re: [ansible-project] Dell EMC Unity/Unisphere with Ansible

2019-09-22 Thread Vladimir Botka
On Sat, 21 Sep 2019 20:23:13 -0700 (PDT) Tanisha Mishra wrote: > Using the python module > https://github.com/jialehuo/ansible-dellemc-unity/blob/master/library/dellemc_unity.py > , > [...] > - name: Updates > dellemc_unity: > unity_hostname: "165.114.74.40" >

Re: [ansible-project] Pip install docker

2019-09-21 Thread Vladimir Botka
On Sat, 21 Sep 2019 13:18:42 +0200 Alfredo De Luca wrote: > - name: Install docker libs with pip > pip: > name: docker > state: present > > > *"Unable to find any of pip3 to use. pip needs to be installed." Find out which pip you'd like to use. For example $ which pip3

Re: [ansible-project] iptables, new chains, marking

2019-09-20 Thread Vladimir Botka
On Fri, 20 Sep 2019 17:53:18 -0700 (PDT) Marc Singer wrote: > I'm working to reimplement an existing firewall using the iptables module. > I'm not seeing a command to create (or make to exist) a chain ... > I also don't see commands to handle marking. The match option is present, > but I

Re: [ansible-project] Do not wish to use python for Ansible's file module.

2019-09-19 Thread Vladimir Botka
On Wed, 18 Sep 2019 23:59:29 -0700 (PDT) Mohtashim S wrote: > I do not have python on the target servers. > Is there a way to get ansible do this task without the need of python ? No. It is not. Cheers, -vlado -- You received this message because you are subscribed to the Google

Re: [ansible-project] ansible 2.8.4 throwing errors on all playbooks

2019-09-18 Thread Vladimir Botka
On Tue, 17 Sep 2019 19:06:36 -0700 (PDT) Andrew Meyer wrote: > I just updated CentOS 7 to the latest and now am getting this any playbook > I try to run. > > [andrew@automation01 installer]$ ansible-playbook -i inventory install.yml - > vv > Traceback (most recent call last): > File

Re: [ansible-project] Permissions problem when copying file to a Solaris 10 host remote with unprivileged user

2019-09-17 Thread Vladimir Botka
On Tue, 17 Sep 2019 16:11:18 +0200 Vladimir Botka wrote: > On Tue, 17 Sep 2019 05:29:05 -0700 (PDT) > Sur Veillor wrote: > > > > setfacl "-r" option is not available in Linux. Linux man setfacl says > > > FWIW, "Solaris Working Group" mig

Re: [ansible-project] Permissions problem when copying file to a Solaris 10 host remote with unprivileged user

2019-09-17 Thread Vladimir Botka
On Tue, 17 Sep 2019 05:29:05 -0700 (PDT) Sur Veillor wrote: > > setfacl "-r" option is not available in Linux. Linux man setfacl says > > FWIW, "Solaris Working Group" might be interested to learn about it > > https://github.com/ansible/community/wiki/Solaris > > > Indeed, I checked the

Re: [ansible-project] Permissions problem when copying file to a Solaris 10 host remote with unprivileged user

2019-09-17 Thread Vladimir Botka
On Mon, 16 Sep 2019 14:28:10 -0700 (PDT) Sur Veillor wrote: > man of setfacl inform about -r option : > > -rRecalculates the permissions for the ACL > >mask entry. The permissions specified in > >the ACL mask entry are

Re: [ansible-project] Permissions problem when copying file to a Solaris 10 host remote with unprivileged user

2019-09-16 Thread Vladimir Botka
On Mon, 16 Sep 2019 14:28:10 -0700 (PDT) Sur Veillor wrote: > [...] > *4 - Ansible executes his scripts with the "become_user" and here comes the > issue**:* > [...] > * (2, b"/usr/bin/python: can't open file > '/var/tmp/ansible-tmp-1568504245.1231182-74525082315384/AnsiballZ_stat.py': >

Re: [ansible-project] Ansible installation of MongoDB - missing mongodb folder in /var/run

2019-09-16 Thread Vladimir Botka
Hi Stephen, > > > I'm deploying MongoDB to a number of servers using the script below. > > > Servers are Ubuntu 18.0.4. I have an issue where the installation > > > fails > > > to create a mongo folder in /var/run/ and thus can't start the service > > > (No > > > place to put the

Re: [ansible-project] Ansible installation of MongoDB - missing mongodb folder in /var/run

2019-09-16 Thread Vladimir Botka
Hi, On Mon, 16 Sep 2019 00:59:18 -0700 (PDT) Stephen Thorpe wrote: > I'm deploying MongoDB to a number of servers using the script below. > Servers are Ubuntu 18.0.4. I have an issue where the installation fails > to create a mongo folder in /var/run/ and thus can't start the service (No

Re: [ansible-project] Variable resolution issue, bug or feature?

2019-09-14 Thread Vladimir Botka
On Sat, 14 Sep 2019 17:27:23 +0200 Vladimir Botka wrote: > On Sat, 14 Sep 2019 09:05:55 -0500 > Michael Cronenworth wrote: > > > On 9/13/19 11:15 PM, Vladimir Botka wrote: > > > It would be just guessing without complete, minimal, reproducible > > > exam

Re: [ansible-project] Variable resolution issue, bug or feature?

2019-09-14 Thread Vladimir Botka
On Sat, 14 Sep 2019 09:05:55 -0500 Michael Cronenworth wrote: > On 9/13/19 11:15 PM, Vladimir Botka wrote: > > It would be just guessing without complete, minimal, reproducible example. > > git clone https://github.com/mooninite/ansible-test > cd ansible-test > ansibl

Re: [ansible-project] Variable resolution issue, bug or feature?

2019-09-13 Thread Vladimir Botka
Hi, On Mon, 9 Sep 2019 09:33:06 -0700 (PDT) Michael Cronenworth wrote: > I have a role that when it runs is only partially resolving variables. > > Variable_A: defined in defaults - string > Variable_B: defined in defaults - hostvars reference to Variable_C that > will be loaded through

Re: [ansible-project] Re: Privileges for become_user

2019-09-13 Thread Vladimir Botka
On Fri, 13 Sep 2019 01:13:02 -0700 (PDT) "'Torsten Lorenz' via Ansible Project" wrote: > > > the sudo-configuration in our enviroment is pretty strict, so i´m sure, > > > that we couldn´t work with ansible in this cases. "Sudo su" to become > > > root isn´t allowed thanks a lot. > > How are

Re: [ansible-project] Re: Privileges for become_user

2019-09-13 Thread Vladimir Botka
On Thu, 12 Sep 2019 23:54:30 -0700 (PDT) "'Torsten Lorenz' via Ansible Project" wrote: > the sudo-configuration in our enviroment is pretty strict, so i´m sure, > that we couldn´t work with ansible in this cases. "Sudo su" to become root > isn´t allowed. > thanks a lot Hi, FYI, there are

Re: [ansible-project] Privileges for become_user

2019-09-12 Thread Vladimir Botka
On Thu, 12 Sep 2019 04:47:39 -0700 (PDT) "'Torsten Lorenz' via Ansible Project" wrote: > executing > "sudo /usr/bin/systemctl start filebeat.service" > works pretty fine, but i would like to use the service-modul. > > My playbook looks like this: > - name: testplay > hosts:

Re: [ansible-project] using set_fact with until

2019-09-11 Thread Vladimir Botka
On Wed, 11 Sep 2019 14:50:24 -0700 (PDT) flowerysong wrote: > That seems overly complex. I would instead wait until the required data is > available before running set_fact: > > - vars: > che_keycloak_lookup: "{{ lookup('k8s', ... > [...] > - debug: > msg: Waiting for data

Re: [ansible-project] using set_fact with until

2019-09-11 Thread Vladimir Botka
On Wed, 11 Sep 2019 18:02:08 +0530 Kamesh Sampath wrote: > > >> set_fact: > > >> che_keycloak: > > >> "{{ lookup('k8s', > > >> api_version='route.openshift.io/v1',kind='Route',resource_name='keycloak',namespace='che') > > >> > > >> }}" > > >> register: che_keycloak_route_result > > >>

Re: [ansible-project] using set_fact with until

2019-09-11 Thread Vladimir Botka
Fixed syntax. --- - set_fact: che_keycloak: "{{ lookup('k8s', api_version='route.openshift.io/v1', kind='Route', resource_name='keycloak',

Re: [ansible-project] using set_fact with until

2019-09-11 Thread Vladimir Botka
On Wed, 11 Sep 2019 02:57:51 -0700 (PDT) Kamesh Sampath wrote: > > > > > > > > > > > > until: che_keycloak.spec is defined > > > > > > > > > > > > can't find the parameter "spec" because there isn't any. > > > > > > the spec becomes available only after few seconds; so I need to keep

Re: [ansible-project] using set_fact with until

2019-09-11 Thread Vladimir Botka
On Wed, 11 Sep 2019 15:04:44 +0530 Kamesh Sampath wrote: > > > > that "set_fact" declares the variable "che_keycloak". The condition > > > > > > > > until: che_keycloak.spec is defined > > > > > > > > can't find the parameter "spec" because there isn't any. > > > > > > > do you mean to

Re: [ansible-project] using set_fact with until

2019-09-11 Thread Vladimir Botka
On Wed, 11 Sep 2019 01:44:50 -0700 (PDT) Kamesh Sampath wrote: > > Yes. The the fact will be evaluated and set on each iteration. The problem > > is > > that "set_fact" declares the variable "che_keycloak". The condition > > > > until: che_keycloak.spec is defined > > > > can't find

Re: [ansible-project] using set_fact with until

2019-09-11 Thread Vladimir Botka
On Wed, 11 Sep 2019 10:39:49 +0200 Vladimir Botka wrote: > On Wed, 11 Sep 2019 00:22:50 -0700 (PDT) > Kamesh Sampath wrote: > > > I am trying to use `set_fact` with `until` and `retries`, will the fact be > > evaluated and set during each iteration ? Some

Re: [ansible-project] using set_fact with until

2019-09-11 Thread Vladimir Botka
On Wed, 11 Sep 2019 00:22:50 -0700 (PDT) Kamesh Sampath wrote: > I am trying to use `set_fact` with `until` and `retries`, will the fact be > evaluated and set during each iteration ? Sometimes I see the value is not > being set and I get the failure after the retries. While I see the >

Re: [ansible-project] When condition 'or' structure question

2019-09-10 Thread Vladimir Botka
On Tue, 10 Sep 2019 21:16:04 +0200 Kai Stian Olstad wrote: > On 10.09.2019 20:14, Vladimir Botka wrote: > > On Tue, 10 Sep 2019 10:45:45 -0700 > > Guy Knights wrote: > > > >> It's possible to define a series of 'and' conditions for a task as follows: >

Re: [ansible-project] When condition 'or' structure question

2019-09-10 Thread Vladimir Botka
On Tue, 10 Sep 2019 10:45:45 -0700 Guy Knights wrote: > It's possible to define a series of 'and' conditions for a task as follows: > > when: > - foo == true > - bar == true > > As far as I'm aware, the only way to define 'or' conditions is in-line, as > such: > > when: foo ==

Re: [ansible-project] Ansible problem when i use --check

2019-09-10 Thread Vladimir Botka
Hi, On Tue, 10 Sep 2019 01:36:41 -0700 (PDT) Karther wrote: > [...] > If i use this condiiton *when: not ansible_check_mode* i don't can verify > if my task works ... :/ > It's very pity that aspect check mode is not full and strong... :( The option "--check" can be only as "full and strong"

Re: [ansible-project] How to iterate over nested list and split it into two groups using add_host?

2019-09-09 Thread Vladimir Botka
On Mon, 9 Sep 2019 12:52:37 +0200 Vladimir Botka wrote: > On Mon, 9 Sep 2019 00:54:32 -0700 (PDT) > Danny Rehelis wrote: > > > > > vars: > > > >my_hosts: > > > > - ['host1', 'host2'] > > > >

Re: [ansible-project] How to iterate over nested list and split it into two groups using add_host?

2019-09-09 Thread Vladimir Botka
On Mon, 9 Sep 2019 00:54:32 -0700 (PDT) Danny Rehelis wrote: > > > vars: > > >my_hosts: > > > - ['host1', 'host2'] > > > - ['host3'] > > > [...] > > > loop: "{{ my_hosts }}" > > > [...] > > > ERROR! Unexpected Exception, this is probably a bug: unhashable type: > > > >

Re: [ansible-project] How to iterate over nested list and split it into two groups using add_host?

2019-09-09 Thread Vladimir Botka
On Mon, 9 Sep 2019 00:05:26 -0700 (PDT) Danny Rehelis wrote: > vars: >my_hosts: > - ['host1', 'host2'] > - ['host3'] > [...] > loop: "{{ my_hosts }}" > [...] > ERROR! Unexpected Exception, this is probably a bug: unhashable type: 'list' > > I'm having hard time iterating this

Re: [ansible-project] Re: Hardening SSH With Ansible

2019-09-05 Thread Vladimir Botka
On Thu, 5 Sep 2019 08:28:36 -0700 (PDT) Jon Adcock wrote: > Vlado, It's my understanding that the validate step should be done once in > the playbook. Not for each sshd action in the playbook. Is that what you > are saying? Jon, how this might be accomplished? "validate" by design says:

Re: [ansible-project] Re: Hardening SSH With Ansible

2019-09-05 Thread Vladimir Botka
Hi ! > > regexp: "^(#|#\s|\s|)PermitRootLogin\s*(no|yes)" > Actually \s* is not *one or many*, but *zero or many*. There should be at > least one space so `\s+` 1) Searching for both commented and non-commented lines is risky. There might be both present in the file and the result will be

Re: [ansible-project] How to pass stdout of a variable belonging to different Ansible play ?

2019-08-31 Thread Vladimir Botka
On Fri, 30 Aug 2019 02:41:12 -0700 (PDT) Mohtashim S wrote: > The solution given with "my_list" is complaining of the below error: > > > > FAILED! => {"msg": "The task includes an option with an undefined > > variable. The error was: 'dict object' has no attribute 'results'\n\nThe > > error

Re: [ansible-project] How to pass stdout of a variable belonging to different Ansible play ?

2019-08-30 Thread Vladimir Botka
On Fri, 30 Aug 2019 01:22:08 -0700 (PDT) Mohtashim S wrote: > - name: Play 2 > hosts: remotehost > tasks: >- shell: "~/rollback.sh {{ Number }} '{{ InstallDir }}' '{{ > hostvars[\"localhost\"][\"command_result\"].results|map(attribute=/'stdout/')|list > > }}' > ~/rollback.log" > > I

Re: [ansible-project] How to pass stdout of a variable belonging to different Ansible play ?

2019-08-30 Thread Vladimir Botka
On Fri, 30 Aug 2019 01:22:08 -0700 (PDT) Mohtashim S wrote: > How to pass "stdout" of a variable "command_result" belonging to Ansible > Play-1 to shell module of a different Play-2? > > My playbook looks like below: > > - name: Play 1 > hosts: localhost > tasks: >- name: "Collect

Re: [ansible-project] Cannot show output when using raw command in ansible

2019-08-30 Thread Vladimir Botka
On Thu, 29 Aug 2019 22:49:54 -0700 (PDT) Mac Kam wrote: > HI friends, > > When I use raw command in out remote router, then cannot show the output. > [...] > -name: Print output > debug: > msg: "{{result.stdout}}" You can show the output. But the output is empty.

Re: [ansible-project] Using information between Ansible playbooks

2019-08-29 Thread Vladimir Botka
On Thu, 29 Aug 2019 10:50:11 -0700 (PDT) pk s wrote: > Thanks. It works for localhost. > > But let's say i need to save information from a task on all remote hosts in > a local file (or files), how do i do it? So that in the next yml file, i > can load the local file for all remote hosts.

Re: [ansible-project] Importing list file ?

2019-08-29 Thread Vladimir Botka
On Thu, 29 Aug 2019 19:47:10 +0200 Vladimir Botka wrote: > - set_fact: > my_patch_list: "{{ my_patch_list|default([]) + [item] }}" > loop: "{{ lookup('file','patchlist.txt').splitlines() }}" Actually this is the same. It doesn't make sens

Re: [ansible-project] Importing list file ?

2019-08-29 Thread Vladimir Botka
On Thu, 29 Aug 2019 10:04:55 -0700 (PDT) Tuyen Nguyen wrote: > - set_fact: > my_data: "{{lookup('file','patchlist.txt')|from_yaml}}" > and then in the whitelist option of win_updates: > whitelist: "{{my_data}}" > > The only caveat is that I need to make my patchlist.txt file to be in

Re: [ansible-project] list seen as unicode, not sure why or how to correct

2019-08-29 Thread Vladimir Botka
On Tue, 27 Aug 2019 13:32:11 -0700 (PDT) Nicholas Britton wrote: > I am building a list with output stored from a uri call: > [...] > - name: create list of hostgroups ids > set_fact: > hostgroupnum_l: "{{hostgroupnum_l}} + > ['{{item.hostGroup.hostGroupNumber}}']" > with_items:

Re: [ansible-project] Using information between Ansible playbooks

2019-08-28 Thread Vladimir Botka
On Wed, 28 Aug 2019 22:00:20 -0700 (PDT) pk s wrote: > How do i store/use information retrieved from running a playbook task later > in another playbook task? I tried dumping the information in json format > from the first playbook/task to a file. But then how do i read/pass this > information

Re: [ansible-project] Re: Registering value from JSON output

2019-08-28 Thread Vladimir Botka
On Wed, 28 Aug 2019 08:35:23 -0700 (PDT) Cade Lambert wrote: > Ah, ok, I missed that those were backticks. So because we used > double-quotes to encompass the whole argument, and single-quotes to > encompass the json_query argument, we cannot use single-quotes again to > encompass the search

Re: [ansible-project] Re: Registering value from JSON output

2019-08-28 Thread Vladimir Botka
On Wed, 28 Aug 2019 08:04:16 -0700 (PDT) Cade Lambert wrote: > Ok, I guess a little background would help. > [...] > I tried json_query: > > - set_fact: > host_id: "{{ host_list.json.results|json_query('[?name == 'server2'].id') > }}" > > It threw the following error: > fatal:

Re: [ansible-project] ANSIBLE randomly fails to connect to hosts behind bastion

2019-08-28 Thread Vladimir Botka
On Wed, 28 Aug 2019 03:34:53 -0700 (PDT) Alberto Jimenez Lozano wrote: > I use a proxy to connect to some machines ... > ... when I execute two playbooks with proxy simultaneously, it appears > ramdoly error. > Is there any solution? FWIW. It might be more efficient to clone the master inside

Re: [ansible-project] How to incorporate awk command in ansible shell module

2019-08-28 Thread Vladimir Botka
On Wed, 28 Aug 2019 00:35:19 -0700 (PDT) Mohtashim S wrote: > shell: "ls -ltr {{ BASEPATH }}/{{ vars[item.split('.')[1]] }}/{{ item Be careful. "vars" is a reserved word https://docs.ansible.com/ansible/latest/reference_appendices/playbooks_keywords.html#play Cheers, -vlado --

Re: [ansible-project] Registering value from JSON output

2019-08-27 Thread Vladimir Botka
On Tue, 27 Aug 2019 12:44:15 -0700 (PDT) Cade Lambert wrote: > [...] > "output": { > "json": { > "results": [ > { > "name": "item1" > "id": "26" > } > { > "name":

Re: [ansible-project] Adding a Fact to a dict for Cisco Interf.

2019-08-27 Thread Vladimir Botka
> - set_fact: > cisco_ios: "{{ cisco_ios.interfaces|combine(interfaces) }}" Errata: - set_fact: cisco_ios: "{{ cisco_ios|combine({'interfaces': interfaces}) }}" -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

Re: [ansible-project] Adding a Fact to a dict for Cisco Interf.

2019-08-27 Thread Vladimir Botka
On Tue, 27 Aug 2019 07:44:24 -0700 (PDT) Spiro Mitsialis wrote: > I have the following that is not working. > > vars: > cmdb: xkjsdflkjsjdl4d > cisco_ios: >interfaces: > gigabit1/0/1: > name: Gigabit1/0/1 > status: up > gigabit1/0/2:

Re: [ansible-project] ansible-playbook inline help

2019-08-26 Thread Vladimir Botka
On Mon, 26 Aug 2019 07:05:02 -0700 (PDT) Emmanuel Lacour wrote: > is it possible to have some kind of way to write a custom help inside a > playbook that would be printed once (not for each host) when you issue a > command like: ansible-playbook playbooks/myplay.yml --help No. It's not

Re: [ansible-project] Importing list file ?

2019-08-26 Thread Vladimir Botka
On Mon, 26 Aug 2019 05:53:03 -0700 (PDT) Tuyen Nguyen wrote: > Actually, it didn't quite work :( The task was able to run through but I > just realized it was not importing the file in correct as a list for the > whitelist. Use "from_yaml" filter and take a look what you get -

Re: [ansible-project] Re: Ansible Module Failure

2019-08-26 Thread Vladimir Botka
Hi! > > > Set INTERPRETER_PYTHON_FALLBACK and put '/usr/bin/python2.7' into the > > > first place > > > https://docs.ansible.com/ansible/latest/reference_appendices/config.html#interpreter-python-fallback > > > > > Thank you for help. I am still seeing > > module file

Re: [ansible-project] Re: Ansible Module Failure

2019-08-25 Thread Vladimir Botka
On Sun, 25 Aug 2019 09:13:22 -0700 (PDT) Andrew Morgan wrote: > Thank you for help. I am still seeing > sing module file /usr/local/lib/python3.7/site-packages/ansible/modules/ > system/setup.p > > Maybe I am not setting the variable correctly.In my ansible.cfg I have >

Re: [ansible-project] How Do I Conditionally Import a Playbook?

2019-08-25 Thread Vladimir Botka
On Sun, 25 Aug 2019 09:12:57 -0700 (PDT) Chrono 7 wrote: > I'd like to know how to conditionally import a playbook. > [...] > - name: Car required > import_playbook: determine_car_information.yaml > when: car_required == True It's not possible. "import_playbook" is not a task. Conditions

Re: [ansible-project] Re: Ansible Module Failure

2019-08-24 Thread Vladimir Botka
On Sat, 24 Aug 2019 19:38:22 -0700 (PDT) Andrew Morgan wrote: > I have tried below but still the same error > dev_FE ansible_python_interpreter=/usr/bin/python2.7 > [...] > Using module file > /usr/local/lib/python3.7/site-packages/ansible/modules/system/setup.py Set

Re: [ansible-project] Ansible Module Failure

2019-08-24 Thread Vladimir Botka
Hello! On Sat, 24 Aug 2019 12:22:28 -0700 (PDT) Andrew Morgan wrote: > ansible-playbook 2.8.3 > [...] > -c '"'"'echo PLATFORM; uname; echo FOUND; command -v > '"'"'"'"'"'"'"'"'/usr/bin/python'"'"'"'"'"'"'"'"'; command -v > '"'"'"'"'"'"'"'"'python3.7'"'"'"'"'"'"'"'"'; command -v >

Re: [ansible-project] Ansible variables jinja and facts

2019-08-22 Thread Vladimir Botka
On Thu, 22 Aug 2019 15:33:21 -0700 (PDT) Dennis H wrote: > So it’s confusing between all the rules on these three is there a good > resource to go over this? Or maybe someone willing to help me this weekend > figure out when you use quotes when you don’t and when you’re able to use >

Re: [ansible-project] Unable to get value of variable from another Play in Ansible

2019-08-22 Thread Vladimir Botka
On Thu, 22 Aug 2019 12:26:00 -0700 (PDT) Mohtashim S wrote: > - name: "Play 1" > [...] >- add_host: name={{ item }} > groups=dest_nodes > ansible_user={{ USER }} > with_items: "{{ Dest_IP.split(',') }}" > [...] > - name: "Play 3" > [...] >

Re: [ansible-project] get indice in csv file

2019-08-21 Thread Vladimir Botka
that ansible play playbook with this both values. > (there is probabily other values in this file ...) > > Help me please community ansible > > Regards, > > Karther > -- Regards, Vladimir Vladimir Botka vbo...@gmail.com +420.773.041.182 Smeralova 13, Prague 1

Re: [ansible-project] Can’t reach a server?

2019-08-19 Thread Vladimir Botka
Hi! >>> On Mon, Aug 19, 2019 at 9:38 AM Mike Eggleston >>> wrote: >>> What’s happening here? I can reach the server over ssh, but ansible >>> can’t? I’m testing a provisioning play. I can ssh into the box with “ssh >>> root@box” but the command “ansible-playbook -vvv -u root -k —limit box >>>

Re: [ansible-project] Trying to connect master host Ansible to target HP-UX 11.31 ia64 server

2019-08-18 Thread Vladimir Botka
On Sun, 18 Aug 2019 08:02:33 -0700 (PDT) Владимир Куликов wrote: > [root@ansible ~]# ansible -vvv integrity -m ping > ansible 2.8.2 > ... > Pipelining is enabled. > ESTABLISH SSH CONNECTION FOR USER: root > SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o >

Re: [ansible-project] Trying to connect master host Ansible to target HP-UX 11.31 ia64 server

2019-08-18 Thread Vladimir Botka
On Sun, 18 Aug 2019 14:25:00 +0200 Vladimir Botka wrote: > On Sun, 18 Aug 2019 04:32:33 -0700 (PDT) > Владимир Куликов wrote: > > (HP-UX 11.31 ia64 server with installed Python 2.7.16) > > I get an error: > > hpux | UNREACHABLE! => { > > "changed&qu

Re: [ansible-project] Trying to connect master host Ansible to target HP-UX 11.31 ia64 server

2019-08-18 Thread Vladimir Botka
Errata: The problem is "permission failure". You are not able to write to "remote_tmp" https://docs.ansible.com/ansible/2.4/intro_configuration.html#remote-tmp -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group

Re: [ansible-project] Trying to connect master host Ansible to target HP-UX 11.31 ia64 server

2019-08-18 Thread Vladimir Botka
Hi! On Sun, 18 Aug 2019 04:32:33 -0700 (PDT) Владимир Куликов wrote: > Hi! > After tuning connect from master ansible server to target HP-UX server > (HP-UX 11.31 ia64 server with installed Python 2.7.16) by SSH (ssh HPUX - > without password), i try a test: > > #ssh hp-ux > (get connected

Re: [ansible-project] When yum succeeds, boot?

2019-08-18 Thread Vladimir Botka
On Sun, 18 Aug 2019 03:45:20 -0500 Mike Eggleston wrote: > I am working on a playbook that uses yum. When yum does an update of all > installed packages I want to do a conditional shutdown -r. What condition > do I check from the yum task succeeding? > Mike 1) If you want to reboot on any change

Re: [ansible-project] how to stuff running services into a host variable?

2019-08-12 Thread Vladimir Botka
> > > I can't seem to get this syntax correct, and at least one reference I > > > found > > > produced more errors. I'd like to create a list of all running > > > processes. > > > > > > - name: populate running services into a list > > > set_fact: > > > services_running:

Re: [ansible-project] how to stuff running services into a host variable?

2019-08-12 Thread Vladimir Botka
On Mon, 12 Aug 2019 14:57:16 -0500 Amos wrote: > I can't seem to get this syntax correct, and at least one reference I found > produced more errors. I'd like to create a list of all running processes. > > - name: populate running services into a list > set_fact: >

[ansible-project] Re: Loop a play over several group sets

2019-03-06 Thread Vladimir Botka
On Wednesday, March 6, 2019 at 5:07:20 PM UTC+1, Doug OLeary wrote: > > [...] > I'd like to loop at the play level rather than the task level. > To loop over a set of tasks put the tasks into a file *set-of-tasks.yml * and use include_tasks - name: Loop tasks include_tasks: set-of-tasks.yml

Re: [ansible-project] {"changed": false, "msg": "AnsibleUndefinedVariable: 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_default_ipv4'"}

2018-11-04 Thread Vladimir Botka
"HostVarsVars" looks suspicious in the error message. Where does it come from? Find it and check if this is what you want. 'ansible.vars.hostvars.HostVarsVars object' has no attribute 'ansible_default_ipv4' HTH, -vlado -- You received this message because you are subscribed to the Google

[ansible-project] Re: Fail gracefully if no hosts match

2018-10-28 Thread Vladimir Botka
> > > Running the playbook below with an empty group results in 0 exit code. What am I missing? - hosts: test99 pre_tasks: - debug: var=play_hosts delegate_to: localhost HTH, -vlado -- You received this message because you are subscribed to the Google Groups

[ansible-project] Re: apt result is changed incorrectly?

2018-10-24 Thread Vladimir Botka
You asked apt to update the cache update_cache: yes The cache was updated and the task was flagged "changed". "cache_update_time": 1540395343, "cache_updated": true, "changed": true, -- You received this message because you are subscribed to the Google Groups "Ansible

[ansible-project] Re: Diffculty with registering the script output

2018-10-23 Thread Vladimir Botka
Remove the quotation marks. The conditionals are expanded automatically. > when: "scrtipt_output.rc !=0" > ... > The error was: template error while templating string: unexpected char > u\"'\" at 29 > Alternatively you might want to use: when: not scrtipt_output.failed --

[ansible-project] Re: Complex host patterns

2018-10-23 Thread Vladimir Botka
There is an example in the doc (you posted the link). webservers:dbservers: The above configuration means “all machines in the groups ‘webservers’ and ‘dbservers’ are to be managed if they are in the group ‘staging’ also, ... -- You received this message because you are subscribed to

[ansible-project] Re: Galaxy’s new quality scoring of roles - feedback requested

2018-10-23 Thread Vladimir Botka
In response to the question "Works without change?Y/N" the owner of the contribution might want to know what the changes were. Thank you! -vlado -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] Re: Unable to parse ansible/contrib/inventory/ec2.py as an inventory source

2018-10-23 Thread Vladimir Botka
Odd number of the quotation marks caused the error. Fix line 3 in ec2.py Error parsing host definition ': No closing quotation -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

[ansible-project] Re: Get Field with equal condition from json generated ansible 2.5.2 uri module

2018-10-22 Thread Vladimir Botka
> > Try > - debug: var=hc.json.results|json_query('[?name==`hc1`].id') -- 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] Re: Ansible Playbook error - Dict object has no attribute.

2018-10-22 Thread Vladimir Botka
The indentation is wrong (line 10, column 5). Should be: tasks: - name: create rxgt-ps-mgmt-direct-connect-gateway stack -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

Re: [ansible-project] Re: how to best accomodate different default values for variables in a role. eg list of ports to open may change when a new version of the software (= role ) is installed

2018-01-17 Thread Vladimir Botka
Hi Chris, On Wed, 17 Jan 2018 04:12:13 -0800 (PST) Chris7444 wrote: > Well, this is not what I want. I dont want to modify the tasks everytime > the list of ports changes. I guess the answer is by using some include > statement (which will include a file containing

<    2   3   4   5   6   7