Re: [ansible-project] Encrypt files on remote host

2021-11-26 Thread 'Roman Steinhart' via Ansible Project
Hi Stefan, probably with openssl or gpg. See https://gist.github.com/dreikanter/c7e85598664901afae03fedff308736b https://www.gnupg.org/gph/en/manual/x110.html I mean, I could do this with a basic shell module, but I'm wondering that there's no module fur such actions. Thanks, Roman

[ansible-project] Encrypt files on remote host

2021-11-25 Thread 'Roman Steinhart' via Ansible Project
m aware of Ansible vault, but it's intended purpose is for encrypting secrets etc. to use it in the playbook and not encrypting a remote file. Maybe someone has a suggestion. Thanks! ~ Roman -- You received this message because you are subscribed to the Google Groups "Ansible Project" g

[ansible-project] False positives using win_psexec module

2020-10-20 Thread Roman DeHonney
So I am attempting to run an .exe that I created using Auto IT. It simply makes two clicks on a program to perform a test and logs it. It works fine if I am logged into the host and double click the exe. I need to run this via ansible but I keep getting false positives. I am using the win_psex

[ansible-project] Re: ansible-pull configuration

2019-06-10 Thread Roman
Hello, actually my purpose is to configure remote client server from control server (both located in AWS cloud) using ansible-pull running on control node. I'm stuck with parsing host file when executing ansible-pull. Here is the command which I'm running: *ansible-pull* -U *g...@bitbucket.org:

[ansible-project] Re: ansible-pull configuration

2019-06-06 Thread Roman
Hi SUMIT SAHAY, kindly share with the way how you set up hosts file in terms of defining remote hosts On Wednesday, August 8, 2018 at 9:03:45 AM UTC+3, SUMIT SAHAY wrote: > > > Hi All, > > I am trying to setup the ansible pull based on my vm server. > > Is there any step-wise documentation for t

[ansible-project] Re: ansible 2.1 setup fails with this module requires key=value arguments (['<>'])

2016-07-28 Thread Roman Gaufman
Hi Greg, I'm experiencing the same thing on 2 servers, rest are fine. I can ssh to them and I cannot see anything obviously wrong: TASK [setup] *** fatal: [0ca87760df7de0fe2d36]: FAILED! => {"changed": false, "failed": true, "msg

[ansible-project] Sorry, user xxxxx is not allowed to execute '/bin/sh -c echo BECOME-SUCCESS

2016-03-09 Thread Juan Roman
Sorry is this has been posted and answered by I find nothing while searching. I'm attempting to connect to my AIX server but can't sudo. Here's my sudo setup. x ALL=(ALL) /usr/bin/su -,/usr/bin/su - GATHERING FACTS ***

[ansible-project] Help with access to all items in a dictionary

2015-10-23 Thread Roman
Hello, I want to create MySQL users on several db server. Each of servers has several databases. Users can get access to databases from different hosts and with different rights. I've described variables in the dictionary which presented below. Is it possible to get access to each items in

[ansible-project] Re: hostvars with variables for different hosts

2015-10-12 Thread Roman Belyakovsky
FYI, opened an issue <https://github.com/ansible/ansible/issues/12714>. On Friday, October 2, 2015 at 12:08:56 PM UTC+3, Roman Belyakovsky wrote: > > Hello! > > Let's say I have a simple dictionary in host_vars or group_vars: > host_presets: > hostname: "

[ansible-project] hostvars with variables for different hosts

2015-10-02 Thread Roman Belyakovsky
x27;)}}" It works perfectly till I try to get it for other host with hostvars['myvm'].host_presets.hostname. In this case I get the hostname of the server that runs a playbook. Is there a working way for dynamic predefining this kind of host/group vars? Regards, Roman -- You

Re: [ansible-project] generic 'package' module?

2015-09-14 Thread Roman Belyakovsky
Hi Christian, I didn't get how did you do the OS specific package installation. I've ended up with a temporary solution: - name: install python-passlib action: "{{ ansible_pkg_mgr }} name={{ item.name }}" with_items: - { os: Gentoo, name: dev-python/passlib } when: ansible_os_family

[ansible-project] Re: can i use a ansible.cfg var in a playbook?

2015-09-09 Thread Roman Belyakovsky
I believe it should be a good idea to check filters or modules code and implement a filter, i.e. role_path(rolename). It's a bit complicated though: if you just copy this code to your filter it won't work due to

Re: [ansible-project] Problem with permissions

2015-09-08 Thread Roman H
/refdata/PROD02/apps/.tmp", "size": 4096} This is the file that failed with not enough privilege, I ran it as my ansible_ssh_user by logging in into ansible_ssh_host. I got the command line from the logs which showed what was running. I am not sure if there are some variables

[ansible-project] Re: ETA on Ansible 2.0 ?

2015-09-08 Thread Roman Belyakovsky
Any update on ETA? -- 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+unsubscr...@googlegroups.com. To post to this group, send email to ansible-

[ansible-project] delegate_to works incorrectly with with_items

2015-09-03 Thread Roman Belyakovsky
Hello! I have an issue: delegate_to works incorrectly with with_items. I cannot collect missing facts. I've opened an issue <https://github.com/ansible/ansible/issues/1> but it was already closed. Is there anything wrong with my playbook? Thank you, Yours Faithfully, Roman

Re: [ansible-project] Problem with permissions

2015-09-01 Thread Roman H
data directory. If I have to guess, I would say its owned by > root:root with default 0755 permission. Thus only sudo will work. > > /mf > > Roman H > schrieb am Di., 1. Sep. 2015 > 00:51: > >> I have permission problem when I try do deploy something using Ansib

[ansible-project] Problem with permissions

2015-08-31 Thread Roman H
I have permission problem when I try do deploy something using Ansible, here is the log: host001:svc_test_prod02~/ansible$ ansible-playbook -i inventory/prod/ acc.yml -v --vault-password-file=~/.ansible-vault-pw --private-key ~/.ssh/svc_test_prod02 PLAY [impact02] **

[ansible-project] Re: Possible to set Serial per task ( needed when using delegate_to ) ?

2015-05-20 Thread Roman Belyakovsky
As this post is stilled in top of google search let me describe one more way for a single task that should not be done simultaneously on multiple servers: - hosts: all tasks: - name: set fact set_fact: marker: marker - name: group by marker group_by: key=

Re: [ansible-project] Any way to make a task serial (or set mutex so only 1 thread run it at a time)?

2015-05-20 Thread Roman Belyakovsky
Looks like it's going to be possible in v2.0. Move tasks that should be done in 'serial: 1' mode to a separate file. Include it with items iterating over hosts in a group and set some variable to a host name. Add to files in a separate task condition to check if hostname is similar to that vari

[ansible-project] Overriding chroot path for ansible_connection=chroot

2015-05-05 Thread Roman Gaufman
I cannot find any documentation for the chroot connection and I have tried asking on #ansible and googling. When I need to override the ssh host, I can do: ansible_ssh_host: '{{ ip | default("vpn.%s.%s" % (inventory_hostname, domain)) }}' How would I do the same to override the chroot_path?

[ansible-project] Command line with pipes

2015-01-30 Thread Roman Dolgov
tasks: - name: get clusters names command: "ps axu | grep bin/post | egrep -o etc/postgresql/9.3/.* | awk -F '/' '{print $4}'" That command doesn't work in ansible-playbook, but works fine in shell, I got error about wrong arguments of ps tool. How I could use pipes with ansible comm

Re: [ansible-project] Re: results from a multi-item Ansible task lacks the 'stdout_lines' attribute in the returned data structure

2015-01-08 Thread Roman Revyakin
that helps. Best regards, Roman On Fri, Jan 9, 2015 at 3:24 AM, Florian Gysin wrote: > *+ 1 for Romans issue.* > I also find the output of debug to be highly irritating and the missing > stdout_lines attribute on multi-item tasks void the only possible way of > getting human

[ansible-project] Re: ec2_lc module does not support VPC?

2014-09-02 Thread Roman Revyakin
Ok, I think I found the problem - I supplied the name of the security group instead of its id. On Tuesday, September 2, 2014 7:53:33 PM UTC+10, Roman Revyakin wrote: > > Hi guys, > > It appears that ec2_lc module does not really support creation of launch > configurations

[ansible-project] ec2_lc module does not support VPC?

2014-09-02 Thread Roman Revyakin
/";> Sender ValidationError The security group 'xxx' does not exist in default VPC 'vpc-xx' I tried it both with the 1.7 and the most recent version of Ansible: ansible-playbook 1.8 (devel a0635ebb0d) last updated 2014/09/02 19:45:51 Thank

[ansible-project] How to run python setup.py develop command inside virtualenv using ansible

2014-06-27 Thread Roman Dryndik
I want to execute python setup.py develop command inside of virtualenv using ansible. How to do it? Probably could be something like this: - name: egg shell: "python setup.py develop" But I need to execute it inside of virtualenv. How can I do it? -- You received this message beca

[ansible-project] Some tasks in ansible are't executed

2014-06-26 Thread Roman Dryndik
I'm using ansible for some deployment issues. I want to do the following: 1. Install virtualenv 2. Activate installed virtual environment 3. Check if I'm in virtual environment For this purposes I have the following playbook: --- - hosts: servers tasks: - name: u

Re: [ansible-project] Multi-cloud deployment, use site.yml or --extra-vars

2014-06-24 Thread Roman Valls
t; at the end of the {ec2|gce}_instance? Thanks! Roman Den måndagen den 23:e juni 2014 kl. 20:05:03 UTC+2 skrev Michael DeHaan: > > "The inline extra-vars are meant to have things like aws_access_key and > other sensitive tokens away from potentially public version-controlled >

Re: [ansible-project] Multi-cloud deployment, use site.yml or --extra-vars

2014-06-23 Thread Roman Valls
potentially public version-controlled files. In the future we might check if those are on, for instance, $HOME/.botorc instead of having them in a .yml file in our playbook, just one commit away from being published in the open. Thanks again! Roman Den måndagen den 23:e juni 2014 kl. 16:12:24

[ansible-project] Multi-cloud deployment, use site.yml or --extra-vars

2014-06-23 Thread Roman Valls
s_access_key=..." ansible-playbook gce.yml --extra-vars="gce_service_email=..." Here's the original GitHub discussion that triggered this email, thanks Michael DeeHann for pointing this google group: https://github.com/nimiq/ansible-biostar/issues/11 Thanks in advance, Roman

Re: [ansible-project] Re: results from a multi-item Ansible task lacks the 'stdout_lines' attribute in the returned data structure

2014-02-20 Thread Roman Revyakin
Hey Brian, I do not think that the pprint filter on a multi-item task make the output any readable. Based on my previous example, if I do - name: post-deployment tasks executed local_action: shell {{ item }} with_items: cf_post_deployment_tasks when: cf_post_deployment_tasks is defined re

Re: [ansible-project] Re: results from a multi-item Ansible task lacks the 'stdout_lines' attribute in the returned data structure

2014-02-20 Thread Roman Revyakin
Hey Brian, Could you please provide an example (say based on the tasks I've posted earlier in my post), as I could not make use of those filters in 'debug' task. Thank you! On Fri, Feb 21, 2014 at 12:24 PM, Brian Coca wrote: > you have |pprint and |to_nice_json filters to make the output 'hu

Re: [ansible-project] Re: results from a multi-item Ansible task lacks the 'stdout_lines' attribute in the returned data structure

2014-02-20 Thread Roman Revyakin
t is true of the original. > > > On Thu, Feb 20, 2014 at 4:51 PM, Roman Revyakin > wrote: > >> Sorry, posted wrong output for the multi-item task (too early in the >> morning I guess :-). Here's the evidence the multi-item 'results' return >> data structur

[ansible-project] Re: results from a multi-item Ansible task lacks the 'stdout_lines' attribute in the returned data structure

2014-02-20 Thread Roman Revyakin
sks; ls", "module_name": "shell" }, "item": "cd tasks; ls", "rc": 0, "start": "2014-02-21 08:30:31.996872", "stderr&quo

[ansible-project] results from a multi-item Ansible task lacks the 'stdout_lines' attribute in the returned data structure

2014-02-20 Thread Roman Revyakin
f_app_remap.yml\ncf_deployment.yml\nconcat_files.yml\nnpm_install.yml", "stdout_lines": [ "cf_app_remap.yml", "cf_deployment.yml", "concat_files.yml", "npm_install.yml" ] } } C

Re: [ansible-project] Conditionals - when: and is defined works in a weird way

2014-02-03 Thread Roman Revyakin
4 at 1:17 PM, Jesse Keating wrote: > On 2/3/14, 4:32 PM, Roman Revyakin wrote: > >> cat > test_playbook.yaml <> --- >> - hosts: all >>gather_facts: false >> >>tasks: >> - name: Play only if var1 is true and var2 is defined >>

Re: [ansible-project] Conditionals - when: and is defined works in a weird way

2014-02-03 Thread Roman Revyakin
r1 conditions would evaluate to true IMHO and the action would be triggered. On Tue, Feb 4, 2014 at 11:38 AM, Adam Heath wrote: > "false" != false. You have a string/boolean issue. Aka, the var1 is not > the boolean value false, but the string value "false". > > >

[ansible-project] Re: Conditionals - when: and is defined works in a weird way

2014-02-03 Thread Roman Revyakin
Forgot to mention that I use ansible-playbook 1.5 (devel 27199dc219) last updated 2013/12/04 20:39:15 (GMT +1100) On Tuesday, February 4, 2014 11:32:14 AM UTC+11, Roman Revyakin wrote: > > Hi, > > I am not sure whether someone has come across this issue previously - > tryin

[ansible-project] Conditionals - when: and is defined works in a weird way

2014-02-03 Thread Roman Revyakin
unreachable=0failed=0 However in this case it fails (not skips) when the var2 is undefined and var1 is true, which is not really a desired behaviour: $ ansible-playbook -i host -v test_playbook.yaml --extra-vars "var1=true" PLAY [all] ***

Re: [ansible-project] Re: How to use the JSON part of an HTTP response in the subsequent tasks?

2014-01-29 Thread Roman Revyakin
ot;application/json" HEADER_user='{{ usp_user.content | replace("\n", "") }}' `usp_user.content` contains the same JSON structure as `usp_user.json`, only it has got the newlines that I need to remove using the `replace` Jinja2 filter. Regards, Roman On Thursda

Re: [ansible-project] Re: How to use the JSON part of an HTTP response in the subsequent tasks?

2013-12-18 Thread Roman Revyakin
requests (one can use individual key/values to form another JSON structure though) which renders it to be of very limited use unfortunately. I would be glad if someone proves that the above statements are wrong With kind regards, Roman On Thursday, December 19, 2013 12:43:07 PM UTC+11, Roman

Re: [ansible-project] Re: How to use the JSON part of an HTTP response in the subsequent tasks?

2013-12-18 Thread Roman Revyakin
i -f -H "content-type: application/json" -H 'user: {{ usp_user.content | replace("\n", "") }}' -XPUT http://{{ config_manager }}.{{ target_domain }}/archive/settings Regards, Roman On Thursday, December 19, 2013 12:33:10 PM UTC+11, Roman Revyakin wrote: >

Re: [ansible-project] Re: How to use the JSON part of an HTTP response in the subsequent tasks?

2013-12-18 Thread Roman Revyakin
us top-level settings config local_action: > uri url='http://{{ config_manager }}.{{ target_domain }}/archive/settings' method=PUT return_content=yes status_code=200 HEADER_Content-Type="application/json" HEADER_user="{{ usp_user.stdout

[ansible-project] Re: How to use the JSON part of an HTTP response in the subsequent tasks?

2013-12-17 Thread Roman Revyakin
uot;$content_type_header" ... On Wednesday, December 18, 2013 2:20:22 PM UTC+11, Roman Revyakin wrote: > > Hi guys, > > I am facing the problem of not being able to use the JSON part of the HTTP > response in my subsequent tasks in an Ansible playbook. Here are the > re

[ansible-project] How to use the JSON part of an HTTP response in the subsequent tasks?

2013-12-17 Thread Roman Revyakin
#x27;customer': u'52afd279fa33dd1f0004',... I suspect this is at least part of the problem if not the problem on itself - please correct me if I am wrong and this is just the weird formatting that is only visible in the verbose output. I tried inserting the task `debug var=usp_user.j

Re: [ansible-project] Mind-boggling variable expansion in problems in 'lookup'

2013-12-11 Thread Roman Revyakin
' branch of Ansible - and will be stating the version in my next posts should they occur. Thanks again for your time and hints, Best regards, Roman On Thursday, December 12, 2013 12:20:40 AM UTC+11, Michael DeHaan wrote: > > Hi Roman, > > Happy to help. > > Small request

[ansible-project] Mind-boggling variable expansion in problems in 'lookup'

2013-12-11 Thread Roman Revyakin
Hi guys, Can anyone tell me why variables in this simple playbook do not get expanded? --- - hosts: all gather_facts: false user: ubuntu vars: tokens_file: /tmp/tokens.yml tasks: - debug: msg="{{ lookup('file', '{{ tokens_file }}' ) }}" All I get is $ ansible-playbook -i h