[ansible-project] ansible template vars for command line invocation

2021-08-11 Thread Ed Greenberg
e was in a playbook I could provide the variable(s) using -e. How can I do this from the command line invocation? Thanks, Ed -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving ema

[ansible-project] mysql_user does not find /root/.my.cnf

2020-09-16 Thread Ed Greenberg
he .my.cnf needed to be. Since I log in as root, I figure it's /root/.my.cnf. My /root/.my.cnf is: [mysql] user=root password=xxx [mysqldump] user=databasebackup password=xxx Do I need another section, perhaps? What else might be wrong? Thanks, Ed Greenberg -- You rece

[ansible-project] Re: copy remote files to remote directory

2020-08-03 Thread Ed Wong
I somehow missed remote_src. My apologies. On Monday, August 3, 2020 at 3:19:45 PM UTC+8, Ed Wong wrote: > > Hi, > > I'd like to copy (on a remote system) a file from one directory to another. > > What I'm doing is: > > -- tasks: >-- name: co

[ansible-project] copy remote files to remote directory

2020-08-03 Thread Ed Wong
s indirect? I've looked at file: but it can only do symlinks(soft ,hard) and create directories and files. From what I see, it can't copy a file from dir to another. Or have I misread something? Thanks Ed -- You received this message because you are subscribed to the Google Groups &qu

[ansible-project] ansible vs. ansible-playbook re: where they get their config

2020-07-31 Thread Ed Wong
failed=0skipped=0rescued=0ignored=0 So I try "ansible-playbook inst_bind.yml --private-key ~/.ssh/id_infra", but I still get the above error. I ran "ansible-lint inst_bind.yml", but I get no errors. Have I misconfigured something? Thanks Ed -- You recei

[ansible-project] pinging both Windows and Linux hosts

2020-07-30 Thread Ed Wong
RuntimeException\r\n+ FullyQualifiedErrorId : BadExpression\r\n ", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 } So I'm guessing I'm misremembering. So I

[ansible-project] Re: setting up a new system with Ansible

2020-07-23 Thread Ed Wong
Hi Gildas, Thanks for the info. Much appreciated. Ed -- 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.co

[ansible-project] setting up a new system with Ansible

2020-07-21 Thread Ed Wong
g in manually to do things. Thanks for the clarifications. Ed -- 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...@googlegrou

[ansible-project] Trouble with quoting variables

2020-07-02 Thread Ed Greenberg
uot; I've tried quoting the entire thing with both single quotes and then with double quotes, escaping the embedded quotes with backslashes. I've tried putting quotes in jinja curlies. such as {{ '"' }} . Just about every permutation I can think of. Is this even pos

[ansible-project] best way to test for a condition and report it

2019-08-13 Thread Ed Greenberg
reported on the output and (b) tested for in a playbook. I'm more interested in reporting, so I can have a shell script that reports the state of my load balancer and all it's servers. After much reading, I think I need to ask for an approach. Thanks, Ed Greenbert -- Y

[ansible-project] How to run a playbook or command against AWS

2019-02-04 Thread Ed Greenberg
t I don't understand is how to run the playbook. I tried: ansible-playbook secgroup.yml -e'cidr=xxx.xxx.xxx.xxx/32 rule_desc=web7 but the playbook timed out since the above endpoint doesn't answer ssh. So how do I specify what IP/Proto ansible is to use to connect? Many than

[ansible-project] Unexpected vault behavior

2017-10-12 Thread Ed Rice
I am noticing a strange behavior when I use vault to secure a password for a playbook. I am not sure if this happens with other vaulted info. I wrote a playbook that does an ipa-client-join and I used vault to secure my password. In var/log/messages, I see the command string and the username

[ansible-project] ipa-client-install using ansible-vault

2017-10-05 Thread Ed Rice
Ansible version is 2.3.1.0 / Python version is 2.7.5 I have created the following in one of my playbooks - - name: Join IPA domain command: ipa-client-install --server=servername.domain --domain=private.domain --principal=admin --password="{{ipa_password}}" --mkhomedir --force-ntpd -U when t

[ansible-project] Re: Ansible syslogs to user.notice on the managed machine - can I change this?

2017-07-12 Thread Ed Greenberg
This is how I solved the problem in rsyslog.conf: if $pri-text == 'user.notice' and $msg contains 'ansible' then { /var/log/ansible.log stop } I put this pretty close to the top of the rsyslog.conf, above GLOBAL DIRECTIVES. -- You received this message because you are subscribed to t

[ansible-project] Ansible syslogs to user.notice on the managed machine - can I change this?

2017-07-11 Thread Ed Greenberg
I have a task logging to user.notice, and I can't change it. Ansible also logs to user.notice, and I'm wondering if I can change where it does that on a global basis. One of the locals would be nice. Any way to do this? Ed Greenberg -- You received this message because you are

[ansible-project] Did I take this concept too far or is this a bug?

2017-06-15 Thread Ed Balduf
I have a large playbook, which creates groups of VMs in a cloud and each VM needs some number of data volumes attached. I attempted to make it as modular as possible and started using roles and include_roles in loops. To do this, I have a role which loops over an include_role for the VMs and th

[ansible-project] Re: Splitting a variable length list into a list of lists

2017-06-14 Thread Ed
3902117/ansible-list-of-lists-flattening). Ed On Wednesday, June 14, 2017 at 9:14:59 AM UTC-4, Ed wrote: > > It's a combination of both, actually. I can boost the nofile setting, but > I'm still able to construct a large enough package list that it fails. > Things work

[ansible-project] Re: Splitting a variable length list into a list of lists

2017-06-14 Thread Ed
-n? > > Am Dienstag, 13. Juni 2017 22:37:04 UTC+2 schrieb Ed: >> >> Greetings, >> >> I'd like to take a list (of varying size) and split it into a list of >> lists, where each sub-list is at most N elements. I'm not certain where to >> start

[ansible-project] Splitting a variable length list into a list of lists

2017-06-13 Thread Ed
ja / Ansible to build that list of lists. I figure if I can craft the list of lists, I can use with_items on an include, where the include file will run the yum install on one sub-list at a time. I'm open to other approaches on how to solve the problem. Thanks, Ed -- You received this m

[ansible-project] Test for empty dict

2017-06-08 Thread Ed Greenberg
I have this: TASK [debug] *** ok: [localhost] => { "changed": false, "msg": { "changed": false, "volume": {} } } I'd like to test for this condition, where volume is an empty dict. I tried when volu

[ansible-project] using rax_cbs to test a volume

2017-06-05 Thread Ed Greenberg
state= and still got a new volume. Any way to do what I need? Thanks, Ed -- 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-p

Re: [ansible-project] What is the preferred way to loop over items with varying when statements?

2017-05-10 Thread Ed
The problem with just "item.condition" is item.condition is handled as a string (not an expression). As a result, both "7 < 4" and "7 > 4" evaluate to true. On Wednesday, May 10, 2017 at 4:52:12 PM UTC-4, Kai Stian Olstad wrote: > > On 10. mai 2017 22

[ansible-project] What is the preferred way to loop over items with varying when statements?

2017-05-10 Thread Ed
ession. I can't refer directly to the item's when statement, since that's handled as a string (and will resolve to true). What's the best way to accomplish this, warning-free, in 2.3? Is there a filter I can use to do the evaluation? Thanks, Ed $ cat inventory one ansible_c

[ansible-project] DNSMADEEASY question ATTN Brice Burgess

2017-05-10 Thread Ed Greenberg
rd is failing because it does not have a record_type. So adding the record_type (which is TXT by the way) I get a success, but the module created a second TXT record with the same name, which makes sense after reading the code. What I don't see is how a record ever gets updated (or deleted

[ansible-project] dnsmadeeasy question

2017-05-09 Thread Ed Greenberg
Now, I know what it looks like, and what it looked like before, but I don't know how to call the dnsmadeeasy module to put it back. What seems to be needed is a "update record by id" function. Any suggestions? Thanks, Ed Greenberg -- You received this message because you are s

[ansible-project] make module not idempotent

2017-05-03 Thread Ed Greenberg
a way to prevent this. Am I missing something? Thanks, Ed G -- 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...@googl

[ansible-project] Crons on a collection of servers

2017-03-08 Thread Ed Greenberg
uot; minute: "10" hour: "10" day: "*" month: "*" weekday: "2" job: "/etc/webmin/package-updates/update.pl" when: ansible_hostname == 'web-node-1' This should roll all the jobs t

[ansible-project] Re: Ansible target not logging to syslog

2016-07-19 Thread Ed S
asic logging on the target system so that changes can be referenced locally. Thanks, Ed On Friday, July 15, 2016 at 7:59:06 PM UTC-4, Ed S wrote: > > Hello, > I'm running ansible 2.1.0.0 and when running a playbook against a target > system(machine B), there are no message

[ansible-project] Ansible target not logging to syslog

2016-07-15 Thread Ed S
chine b)? If I add log_path=/tmp/ansible.log I get a list of modules and options logged to that file on the manager system(machine A), but still nothing on the target machine (machine b). Thanks, Ed My current setup looks like this: Machine A - Manager system. OS is debian with Ansibl

[ansible-project] Re: How to display JSON when async does not return valid JSON

2016-04-04 Thread Ed
directory is what's hidden behind the invalid JSON message that Ansible returned. On Wednesday, March 30, 2016 at 9:46:20 AM UTC-4, Ed wrote: > > Hi, > > I'm trying to debug a problem where Ansible is reporting that the async > task failed to return valid JSON. Is there

[ansible-project] How to display JSON when async does not return valid JSON

2016-03-30 Thread Ed
un the playbook after the first failure, the task succeeds. I know the issue is not particular to this one task, since when I comment out this task, things fail similarly on the next task - which also uses become_user, with a loop. Thanks, Ed TASK [target_node : Execute retrieve script]

[ansible-project] variable for server as entered in inventory

2015-12-21 Thread Ed Greenberg
but didn't find anything that was a simple as what I'm looking for. Can somebody point me appropriately? Thanks, Ed Greenberg -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop rec

[ansible-project] ec2_vpc always reports configuration has "changed"

2015-11-15 Thread Ed Zhu
quot;us-west-2c", "cidr": "10.0.3.0/24", "id": "subnet-56c7a50f", "resource_tags": {"env": "dev"}}], "vpc": {"cidr_block": "10.0.0.0/16", "dhcp_options_id": "dopt-28498f4d"

[ansible-project] quoting a colon - I can't get it right

2015-07-10 Thread Ed Greenberg
ried a bunch of permutations of quotes, but no luck. Many thanks, Ed G -- 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...@goo

[ansible-project] Re: Writing ansible module in shell/bash script

2015-03-03 Thread Ed Greenberg
I fixed this with: echo -n '{"changed": "true"}' Note that the quotes around "changed" and "true" were essential. Thanks all -- 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 i

[ansible-project] Re: Writing ansible module in shell/bash script

2015-02-13 Thread Ed Greenberg
r\n", "parsed": false } This module, rescued from an old (pre 1.0) installation of ansible, used to succeed, so I wonder, what changed, or what I might have done wrong. This is Ansible 1.8.2-1.el6 from the epel repo, running on centos 6.5. Any help welcome. Thanks, Ed Gr

Re: [ansible-project] Running Ansible from source on Linux with F-Secure SSH instead of OpenSSH; only user privileges

2014-11-27 Thread Ed Voncken
Hi Brian, for fsecure you might need a new connection plugin if it is that > different than the ssh one. Have you tried with paramiko? > Nope, haven't tried Paramiko - will look into that, thanks. -- You received this message because you are subscribed to the Google Groups "Ansible Project"

Re: [ansible-project] Running Ansible from source on Linux with F-Secure SSH instead of OpenSSH; only user privileges

2014-11-27 Thread Ed Voncken
Hi Vincent, > Which operating system? I had to update setuptools to 1.0.1 on CentOS7 > to get pip working over a proxy. > It's SLES10 update 3; I suspect that it's the ancient Python version that's biting me. Due to other fires, I haven't made much progress. Perhaps next week ;-) -- You r

[ansible-project] Running Ansible from source on Linux with F-Secure SSH instead of OpenSSH; only user privileges

2014-11-25 Thread Ed Voncken
there a proper way to use another Python when running Ansible from source? - Anyone have experience getting Ansible to work with other SSH than OpenSSH? Thanks, Ed. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

Re: [ansible-project] Re: "'Connection' object has no attribute 'shell'" when attempting to establish an accelerated connection

2014-08-28 Thread Ed Hein
Hi, I've just encountered the same issue. Ansible 1.7.1 from Debian Testing Repository. OP proposed fix helps. I can reproduce it with this playbook: - hosts: testsetup accelerate: yes accelerate_port: 4711 tasks: - command: /bin/ls Cya, Ed Am Mittwoch, 27. August 2014 01:17:0

[ansible-project] Accessing play.hosts from a play

2014-02-03 Thread Ed Zarecor
's peers. So that in a jinja template I could do something like: {%- for host in play_hosts -%} cluster-add-host {{ host }} {%- endfor %} I have other ways of accomplishing this, but they are not a clean as this and given that plays already provide set operators, I'd like to take adva

[ansible-project] 1.4.4 accessing ansible_hostname from a template

2014-01-27 Thread Ed Zarecor
27;: True} Running ubuntu@ip-10-0-x-x:~$ ansible -i inventory.ini localhost -m setup -c local | grep ansible_host returns "ansible_hostname": "ip-10-0-200-247", Has something changed or are we using the wrong approach here? Best, Ed. -- You received this message because you are