[ansible-project] Re: Task Git Clone Returns Fail when repository cloned

2018-03-23 Thread Mike Kilmer
Forgot to mention: ansible 2.4.3.0 [defaults] callback_plugins = ~/.ansible/plugins/callback_plugins/:/usr/share/ ansible_plugins/callback_plugins:lib/trellis/plugins/callback stdout_callback = output filter_plugins = ~/.ansible/plugins/filter_plugins/:/usr/share/

[ansible-project] Task Git Clone Returns Fail when repository cloned

2018-03-23 Thread Mike Kilmer
I use an Ansible provisioning and deployment framework called Trellis to deploy Wordpress-based applications. I'm cloning the master from a private Bitbucket repository using the following tasks: - name:

Re: [ansible-project] Re: Ansible 2.5.0 Final is available

2018-03-23 Thread Kai Stian Olstad
On Friday, 23 March 2018 22.46.29 CET Tony Chia wrote: > According to the changlog, the following new windows modules are available > win_audit_policy_system > win_audit_rule > win_certificate_store > win_disk_facts > win_product_facts > win_scheduled_task_stat > win_whoami > > However, when I go

[ansible-project] Re: Ansible 2.5.0 Final is available

2018-03-23 Thread Tony Chia
According to the changlog, the following new windows modules are available win_audit_policy_system win_audit_rule win_certificate_store win_disk_facts win_product_facts win_scheduled_task_stat win_whoami However, when I go to http://docs.ansible.com/ansible/latest/list_of_windows_modules.html ,

Re: [ansible-project] Re: No idea how to do this... please help

2018-03-23 Thread Dayton Jones
Ah...the problem was the "exclusive: yes" directive... I removed that, and all the keys are present as expected...thanks again! > > -- 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: No idea how to do this... please help

2018-03-23 Thread Kai Stian Olstad
On Friday, 23 March 2018 21.04.30 CET Dayton Jones wrote: > Ah... thanks! That's almost got it. It fails when a "user" in > public_ssh_keys isn't in ssh_users, but I can work with that. That can be solved by a when statement when: outer.key in ssh_users > The biggest > issue though, is if

Re: [ansible-project] Re: No idea how to do this... please help

2018-03-23 Thread Dayton Jones
Ah... thanks! That's almost got it. It fails when a "user" in public_ssh_keys isn't in ssh_users, but I can work with that. The biggest issue though, is if a user has multiple keys in public_ssh_keys, only the first one gets placed. So I'll need to figure out how to check for multiple keys

[ansible-project] ansible 2.4 and vmware_guest

2018-03-23 Thread talha jilal
Hi all , Another stupid question about ansible 2.4, vmware_guest , folder module really response with very funny way. it gave error at two different levels , 1- When VM need to be create it work only with relative path /folder " 2- When VM already created it work only with relative path

Re: [ansible-project] Re: No idea how to do this... please help

2018-03-23 Thread Kai Stian Olstad
On Friday, 23 March 2018 20.24.52 CET Dayton Jones wrote: > Yes, that's what I've been trying - just failing. I've tried > "with_subelements" "with_nested" even attempted something like: > key: | > {% for name, keys in public_ssh_keys if name in ssh_users %} > ... > > > But haven't hit it

Re: [ansible-project] Re: No idea how to do this... please help

2018-03-23 Thread Dayton Jones
Yes, that's what I've been trying - just failing. I've tried "with_subelements" "with_nested" even attempted something like: key: | {% for name, keys in public_ssh_keys if name in ssh_users %} ... But haven't hit it yet... -- You received this message because you are subscribed to the

Re: [ansible-project] Re: Absurd run_once behavior, skipping entirely if first node fails a when test

2018-03-23 Thread Alex Hunt
Thank you Brian for updating the docs. That makes it much more clear. And thank you James for the workaround!!! The change to dynamic include_tasks rather than the older static include statement seems to work great. Note for people on older releases, you have to be running at least Ansible

Re: [ansible-project] Re: No idea how to do this... please help

2018-03-23 Thread Kai Stian Olstad
On Friday, 23 March 2018 19.43.34 CET Dayton Jones wrote: > The reason I have 2 dictionaries (and can't combine them) is primarily the > "public_ssh_keys" resides in group_var/all/ssh_keys.yml and contains all > the user keys. But ssh_users reside in group_vars/[group_name].yml and > the list

[ansible-project] Re: No idea how to do this... please help

2018-03-23 Thread Dayton Jones
The reason I have 2 dictionaries (and can't combine them) is primarily the "public_ssh_keys" resides in group_var/all/ssh_keys.yml and contains all the user keys. But ssh_users reside in group_vars/[group_name].yml and the list of users can be different per [group name] While I know having

[ansible-project] Re: No idea how to do this... please help

2018-03-23 Thread Gary Collins
Hi, I do something similar.. users: - user_name: user1 user_uid: 667 user_key: "https://URL-TO-KEY-/user1/id_rsa.pub; - user_name: user2 user_group: wheel user_key: "https://URL-TO-KEY-/user2/id_rsa.pub; This way you can iterate over add user with same object

[ansible-project] No idea how to do this... please help

2018-03-23 Thread Dayton Jones
I have 2 separate dictionaries that I need to iterate over to 1) create a user and 2) add their ssh keys (some users might have multiple keys) The first task works, the second...not so much - I've tried so many things, I can't even remember (with_subelements, with_items, lookups, etc). How

Re: [ansible-project] become_user for a given task is not honored when I run shells or scripts on nodes

2018-03-23 Thread Brian Coca
You set become_user, but you don't enable become itself? try adding become: yes -- -- 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

Re: [ansible-project] Help writing custom modules

2018-03-23 Thread Kai Stian Olstad
On Friday, 23 March 2018 17.29.08 CET Kai Stian Olstad wrote: > On Friday, 23 March 2018 15.43.59 CET Simon Weald wrote: > > creation of these is easy using the create playbook here: > > https://gist.github.com/analbeard/cb5913abfc6101b4eef88674853f3c16 > > > > > > However deletion is

Re: [ansible-project] Help writing custom modules

2018-03-23 Thread Kai Stian Olstad
On Friday, 23 March 2018 15.43.59 CET Simon Weald wrote: > creation of these is easy using the create playbook here: > https://gist.github.com/analbeard/cb5913abfc6101b4eef88674853f3c16 > > > However deletion is problematic. If you use the delete playbook at that > link, the first task will

Re: [ansible-project] setting environment variables

2018-03-23 Thread danish09
Thank you very much. Your suggestion is working perfect. On Tuesday, 20 March 2018 15:27:33 UTC, danish09 wrote: > > Thank you for responding to me. I am stuck now at some silly mistake of > mine in that playbook. I will come back to your suggestion as soon as I > correct the error. > > Thanks

[ansible-project] Ansible 2.5.0 Final is available

2018-03-23 Thread mattdavi
Hi all- we're happy to announce that the general release of Ansible 2.5.0 is now available! How do you get it? -- $ pip install ansible==2.5.0 --user The tar.gz of the release can be found here:

[ansible-project] Help writing custom modules

2018-03-23 Thread Simon Weald
I'm currently writing my own modules to interface with my DNS provider, but I'm running into some issues regarding some execution logic. The provider currently has the following structure for their records: zone < zone domain < zone domain record. - zone is a container which logically

Re: [ansible-project] Re: Absurd run_once behavior, skipping entirely if first node fails a when test

2018-03-23 Thread Brian Coca
I updated the docs in an effort to clarify this, https://github.com/ansible/ansible/pull/37754, any suggestions that help avoid more confusion on this subject are welcomed. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project"

Re: [ansible-project] Re: Architecture of a complex ansible project

2018-03-23 Thread Marcos Alano
You can use the option --roles-path . On Fri, Mar 23, 2018 at 10:36 AM, wrote: > Is the folder where galaxy upload the roles locally on your machine part of > the path that ansible-playbook will look for to find a role ? > > On Friday, March 23, 2018 at 11:52:20 AM UTC+1,

[ansible-project] Re: Architecture of a complex ansible project

2018-03-23 Thread cmoullia
Is the folder where galaxy upload the roles locally on your machine part of the path that ansible-playbook will look for to find a role ? On Friday, March 23, 2018 at 11:52:20 AM UTC+1, cmou...@redhat.com wrote: > > Hi > > Is there a document describing the best practices to organise a complex

Re: [ansible-project] Set up a check for the patching logs in the nodes

2018-03-23 Thread Shreela Roy
Hi Kai/Team, Can you give me a small example of using file module for matching strings in the file? On Tuesday, 20 February 2018 23:24:39 UTC+5:30, Kai Stian Olstad wrote: > On Tuesday, 20 February 2018 18.38.06 CET Shreela Roy wrote: > > I am running an ansible playbook for patching the

[ansible-project] Re: Ansible remote installation of SQL server 2016.

2018-03-23 Thread 12177589
Thank you very much. I did write the wrong one. However, after configuring the CredSSP, the installation of SQL server 2016 is still the same mistake as before, and what needs to be done to install it? 在 2018年3月23日星期五 UTC+8下午6:23:23,Jordan Borean写道: > > The docs should be more explicit, you

Re: [ansible-project] Using ansible data management. I have use case to solve.

2018-03-23 Thread Kai Stian Olstad
On 23.03.2018 07:10, GURU W wrote: Hi All, I know ansible is for configuration management, provisioning, task automation. Ansible is already use to solve the purpose. *Background:* I have shell scripts to read a filename from source and copying them to declared target location. *Ex:*

Re: [ansible-project] Use role defined under another filesystem path

2018-03-23 Thread Marcos Alano
You could use Ansible Galaxy to import your roles. I think this is the sane approach. On Thu, Mar 22, 2018 at 2:48 PM, wrote: > Hi > > My playbook is executed from this directory /home/projectA/playbook and it > contains roles directory. > One of the task defined within a

Re: [ansible-project] playbook works but hangs

2018-03-23 Thread Marcos Alano
May be you search for some module to deal with Juniper devices. I don't have any so I can't be more precisely. On Fri, Mar 23, 2018 at 7:55 AM, 'Daley Okuwa' via Ansible Project wrote: > Hello, > > I have a playbook here which seems to do what it needs to do but

Re: [ansible-project] Architecture of a complex ansible project

2018-03-23 Thread Marcos Alano
On Youtube you has this amazing video about best practices: https://www.youtube.com/watch?v=5BhAJ4mEfZ8 I think you should standardize your roles and export to it's own repository. After that you can use Ansible Galaxy to install that. You should think "I don't want to publish my roles!" but

[ansible-project] playbook works but hangs

2018-03-23 Thread 'Daley Okuwa' via Ansible Project
Hello, I have a playbook here which seems to do what it needs to do but hangs It actually copies the file using ftp but cannot find a way to exit out of the program --- - name: backup of juniper using expect hosts: juniper connection: local tasks: - name: copy running config to ftp

[ansible-project] Architecture of a complex ansible project

2018-03-23 Thread cmoullia
Hi Is there a document describing the best practices to organise a complex Ansible project ? Here is the project that I'm thinking about : - Project has been designed as a collection of reusable modules (= role) which are living under by example this folder "complexproject/roles" fo the

Re: [ansible-project] Re: Absurd run_once behavior, skipping entirely if first node fails a when test

2018-03-23 Thread James 'zofrex' Sanderson
Thank you everyone who chimed in on this discussion, it's really helped me understand how run_once works. As for workarounds - Alex I think you were on the right track with the include, but it needs to be dynamic. I think this does what you want: inventory: machine-a machine-b playbook.yml:

[ansible-project] Re: Ansible remote installation of SQL server 2016.

2018-03-23 Thread Jordan Borean
The docs should be more explicit, you don't need to specify a certificate thumbprint, it will use a random one generated each time the host starts. Those docs are only there if you wanted to set an explicit cert but that isn't required for CredSSP. The reason why it failed to connect is you

[ansible-project] Re: Ansible remote installation of SQL server 2016.

2018-03-23 Thread 12177589
Hi, I used the CredSSP document for some configuration, but I don't know what to do with the value of $certificate_thumbprint. # note the value $certificate_thumbprint will be different in each # situation, this

[ansible-project] Can you set_fact on success or failure of play?

2018-03-23 Thread Marcos Georgopoulos
Hi, I have been trying to find a solution to the current scenario. Say we have 3 plays 1)Pre-Condition Check - check that the host is in the correct state before proceeding. 2)Make Change 3)Post-Condition Check Now we don't want the 2nd play to be run on hosts that failed the first play.

[ansible-project] Using ansible data management. I have use case to solve.

2018-03-23 Thread GURU W
Hi All, I know ansible is for configuration management, provisioning, task automation. Ansible is already use to solve the purpose. *Background:* I have shell scripts to read a filename from source and copying them to declared target location. *Ex:* "xyz_date_123.txt" (script does the task