Re: [ansible-project] How to add an LXD container on another machine and copy Ansible's public keys to the container?

2017-06-26 Thread Pshem Kowalczyk
Hi, Depending on the distro you run in the container you might be able to use cloud-init for it. This is what I do with ubuntu inside the container: #Create a profile - name: create a bootstrap profile lxd_profile: name: bootstrap description: "used for bootstrapping of containers"

Re: [ansible-project] Idiot check on how register: is supposed to work?

2017-06-26 Thread John Favorite
Take a look at the stat module. It has slightly better examples of what you are trying to do: http://docs.ansible.com/ansible/stat_module.html On Mon, Jun 26, 2017 at 10:17 PM wrote: > Hello all, > > I'm *very* new to ansible, and hope that this is something very simple >

[ansible-project] Ansible module run on remote HP-UX 11.11 servers

2017-06-26 Thread Amy Ng
We are trying to get ansible modules to run on remote HP-UX 11.11 systems. We have installed Python 2.7.6 on these systems. It works for some modules (e.g. ping module). However, some of the ansible modules will return “Unresolved symbol” errors. Does anyone know how to get ansible modules to

[ansible-project] Idiot check on how register: is supposed to work?

2017-06-26 Thread bobby . kuzma
Hello all, I'm *very* new to ansible, and hope that this is something very simple that has escaped me. Here's what I'm trying to accomplish: I'm doing a task on prior runs that shouldn't be repeated, so I'm dropping a flag on the system to pick up on future playbook runs. - name: Check for

[ansible-project] interactive commands

2017-06-26 Thread Thai Nguyen
Hi, I wish to perform a copy tftp:// running-config using Ansible in order to copy an access-list to ios running config. I tried any things but no luck. Just wonder if it is possible and if so please share with me how to. Thanks -- You received this message because you are subscribed to the

[ansible-project] Can Ansible support offline files?

2017-06-26 Thread Omer Shtivi
Hello, I'm new to Ansible. I got a task in work to check all the configuration of our switches if they are complaint. I can't SSH to the devices to perform the checks. Can Ansible perform such tasks? running over config file and determinate if it's complaint or not with the playbook? Thanks!

[ansible-project] How to add an LXD container on another machine and copy Ansible's public keys to the container?

2017-06-26 Thread Greg K
I am looking to use Ansible running on one machine to create a container on another machine and exchange ssh keys with it. I am new to Ansible and have been trying different things based off a playbook I found on github

[ansible-project] Re: Ansible WinRM Connection 'Connection reset by peer' only when Windows Role ADFS/WAP is Installed and Post Configuration Finished

2017-06-26 Thread David Baumann
Yeah i know that is based on http.sys I checked also the http/https binding over netsh and compare them between a working and non working system. Realy no clue why this happening. I put now 3 Days of work into that debugging, now i switch to ensure the dns records are prefilled priorer theh

[ansible-project] Re: handlers and include files with variables in filenames

2017-06-26 Thread Jeff Li
I encountered the same problem. I solved it by use vars_files in playbook. The directory structure looks like playbook.yml vars/main.yml And the playbook.yml looks like --- hosts: all vars_files: - vars/main.yml tasks: roles: ... On Thursday, June 8, 2017 at

[ansible-project] Ansible module to delete root volume on termination

2017-06-26 Thread atangirala
Hello, I couldn't delete EBS root volume using ansible "delete on termination" module. Once the instance get terminated, the attached root volume remains instead of getting deleted. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

[ansible-project] Re: handlers and include files with variables in filenames

2017-06-26 Thread Jeff Li
I solved the problem by using vars_files directive in playbook. The directory structure looks like playbook.yml vars/main.yml roles/my-roles/... The playbook.yml looks like --- hosts: all vars_files: - vars/main.yml tasks: roles: On Thursday, June 8, 2017 at

[ansible-project] S3: get/put fail when multi-part file already on S3 #544

2017-06-26 Thread Andrew Howden
Hola All, A colleague just picked up that S3 + Boto does not handle multipart uploads. The following issue seems to indicate that there was a discussion on the mailing list, but I cannot see it: https://github.com/ansible/ansible/issues/5442#issuecomment-297704581 Is this perhaps something

[ansible-project] Filtering by arrays within arrays.

2017-06-26 Thread Phillip
I've run into a snag and feel like an idiot because I can't seem to figure it out. you can filter through complex data by doing {{ var.sub.data }} this works great but what about when that data has it's own array? A perfect example would be something like eth0 data. "ipv4": {

[ansible-project] local_actions: copy contents from stdout issue...LARGE file?

2017-06-26 Thread Jon Williams
Hi, I am using the 'copy content' module to grab the contents of a file from an old version of F5 (where the copy / fetch module doesn't work due to simplejson not being available) Here is an extract play I have put together: - name: "Backup BigIP v10 Config" raw: '!/bin/bash -c

[ansible-project] Ansible tower email notifications

2017-06-26 Thread DM
Hi! I was wondering is it possible to change Ansible Tower notification ( email ) subject and the message that will be send ? I have created the notification and I am using it in my job template and it is working. Only thing that I would like to change ( if possible ) is the subject and

[ansible-project] Variable namespacing

2017-06-26 Thread Ben Mildren
When wanting to namespace variables in a role, is it typical to use a hash, or a prefix? Is there a best practice for this? e.g. role_name_var_one: 1 role_name_var_two: 2 role_name_var_three: 3 or role_name: var_one: 1 var_two: 2 var_three: 3 -- You received this message because you

Re: [ansible-project] blanket-apply delegate_to to roles

2017-06-26 Thread Koteswara Rao Sakhamuri
Hi Dmitry Makovey, Im also looking for the same solution, To run the play on other machine in the same task like this... - hosts: webservers roles: - { role: iinstall_web} - { role: delegated_role, delegate_to: "{{ central_server }}" } I have tried different options but failed. did you

Re: [ansible-project] Play the playbook unprivileged user

2017-06-26 Thread m . hippy . c
ansible-playbook -i , /etc/ansible/install_play.yml -u --private-key=/home//.ssh/id_rsa -vvv And i see /bin/sh -c '"'"'sudo -H -S -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS But unprivileged user doesn't have sudo /bin/sh. How run without executable /bin/sh? четверг, 22 июня 2017

[ansible-project] Unable to install dot net framework 4.5.2 using win_feature

2017-06-26 Thread arpi . 89
Hi I am facing two issues: 1) I am trying to install Dot Net framework 4.5.2 using win_feature: - win_feature: name: DotNet-4-5-2 state: present I am getting below error message: fatal: [13.90.93.211]: FAILED! => { "changed": false, "failed": true, "msg": "The

Re: [ansible-project] Play the playbook unprivileged user

2017-06-26 Thread m . hippy . c
ansible-playbook -i 192.168.10.11, /etc/ansible/install_play.yml -u user --private-key=/home/user/.ssh/id_rsa -vvv And executable with /bin/sh -c '"'"'sudo -H -S -u root /bin/sh -c But user without /bin/sh in sudoers file четверг, 22 июня 2017 г., 9:12:14 UTC+3 пользователь Madhusudhanan

[ansible-project] Documentation in command line

2017-06-26 Thread Farrukh Sadykov
Hello, Do you guys know any documentation besides ansible-doc? Where can I get more information. Ansible doc is good for working with modules but it is not helpful to work with lets say lists, loops and so on. I was hoping that there are more documentation. I am looking for command line

[ansible-project] Re: Ansible with programs that get installed into %userprofile%/AppData?

2017-06-26 Thread David Baumann
Ansible will Execute with the ansible_user so Slack gets installed in the ansible_user profile This is not Ansible Fault, its Slack Installer/Architekture Fault. Slack got a Workaround for this Look here https://get.slack.help/hc/en-us/articles/212475728-Deploy-Slack-via-Microsoft-Installer Am

[ansible-project] issue am fighting with

2017-06-26 Thread Ram Raj
# Get Token ## - name: "Get Token for {{ wwwurl }}" hosts: all connection: local tasks: - name: "Post to /mga/sps/oauth20/token" uri: url: "{{ wwwurl }}/mga/sps/oauth/oauth20/token" method: POST

[ansible-project] Re: Anyone have experiences with using lots of groups and group_vars files?

2017-06-26 Thread jerry
We are going similar things on not too different a scale (~2000 servers.) We abuse groups heavily. I have the mantra that a fact should only be defined once. So if I have a link between two machines, I don't want the same link definition in both. This means I use two different things heavily.

Re: [ansible-project] Flush fact cache from within playbook?

2017-06-26 Thread Dick Visser
On 26 June 2017 at 18:35, Brian Coca wrote: > http://docs.ansible.com/ansible/meta_module.html has a 'clear_facts' . Spot on, thanks!! -- Dick Visser Sr. System & Network Engineer GÉANT Want to join us? We're hiring: https://www.geant.org/jobs -- You received this

[ansible-project] Re: [noUsing ansible.cfg in working directory?

2017-06-26 Thread Daniel JD
Is your $ANSIBLE_CONFIG Variable set? Ansible will look for the first file in this order (the variable, current dir, homdir, etc/ansible). Are you standing exactly at the same position where the ansible.cfg is? Otherwise it should work? Am Montag, 26. Juni 2017 18:57:45 UTC+2 schrieb leam

Re: [ansible-project] Anyone have experiences with using lots of groups and group_vars files?

2017-06-26 Thread Pshem Kowalczyk
On Thu, 22 Jun 2017 at 09:30 William Saxton wrote: > New user here trying to figure out the best way to convert our current > server provisioning system to Ansible. Our system uses approx. 5 different > attributes to provision each server and we have about 1,000 servers. I'm

[ansible-project] Re: Dynamic inventory - how to use group:children

2017-06-26 Thread Trond Hindenes
indeed it is. Thank you!! On Monday, June 26, 2017 at 6:24:50 AM UTC+2, Paul Markham wrote: > > There's a "children" field in the JSON. Have a look at > http://docs.ansible.com/ansible/dev_guide/developing_inventory.html, in > the Script Conventions section: > > "children": ["marietta",

[ansible-project] [noUsing ansible.cfg in working directory?

2017-06-26 Thread leam hall
I'm setting up multiple teams to use one ansible host. The idea is that each team has an ansible "user" that has team playbooks, ansible.cfg file, and hosts files. The directory I'm working in is ~ansible/lang/ansible ### File: ansible.cfg [defaults] become_ask_pass=True ### FIle:

Re: [ansible-project] Flush fact cache from within playbook?

2017-06-26 Thread Brian Coca
http://docs.ansible.com/ansible/meta_module.html has a 'clear_facts' . -- -- Brian Coca -- 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: Obtain --limit parameter in playbook

2017-06-26 Thread thirsch . epages
Can anybody help me with this? I want to know from inside the playbook, what was passed to the --limit parameter (e.g. "my-vm.my-domain.com:localhost") The reason I cannot just connect to the "my-domain" machine, is that I want to read an inventory variable, (the MAC address) before the

Re: [ansible-project] wait_for_connection: doesn't do the job (as expected)

2017-06-26 Thread Reiner Nippes
2017-06-25 4:14 GMT+02:00 Dag Wieers : On Fri, 23 Jun 2017, Reiner Nippes wrote: > > > -snip- > > a) Is this a bug in "wait_for_connection:"? (I think yes.) >> > > No, wait_for_connection does a complete end-to-end test by running a > ping/win_ping module on the remote end. If it

[ansible-project] Re: Privilege escalation - what is best practice?

2017-06-26 Thread Daniel JD
Hey Listing, i would say you should use the become method only if necessary. If the the whole play needs it, set it at playbook- level. If one role needs it (all tasks of it), set it at role- level. If only some tasks need it, set it on task- level. You don't want to be the guy/girl who

[ansible-project] Privilege escalation - what is best practice?

2017-06-26 Thread Listing
Hi all, I am running my playbooks as user ansible (which has sudo rights) for instance but often need to escalate privileges. This can be done in multiple ways: 1. specify per task: become=true 2. specify for the entire playbook at the beginning: become=true 3. specify for the entire host via