Re: [ansible-project] Trying to copy script from local to remote and run

2018-10-16 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
So I simplified my playbook a bit. I disabled selinux on both servers and I'm still getting an error. --- - name: Check for reboot hosts: baseserver-lx become: yes vars_files: - passwd.yml - vars.yml vars: script_dir: "~/" script: "~/needs-restarting.py" tasks: -

[ansible-project] Do YAML inventory plugins support inheritance?

2018-10-16 Thread Guy Knights
I'm experimenting with the new AWS_EC2 plugin and have been wondering if there's a way to streamline the file as we have separate inventory folders for dev, demo and prod. Is there a way to do something like and 'include' for the bulk of the YAML file content and just have the different

[ansible-project] Help using two options for a value for a template

2018-10-16 Thread gabriel . eidlin
Hi guys, Here is why im triying to do: im generating passwords and registering the output in a variable like this - name: Generate Server Password raw: Secret=$(az keyvault secret show --name AdminPassword --vault-name "{{ keyvault }}" --query value --output tsv);if [ -z $Secret ];then

[ansible-project] Help with optimization of 3 tasks (mainly pip and command)

2018-10-16 Thread 'Anatol' via Ansible Project
Hi, I would need advice for following tasks: *1)* *What I want to do as shell command:* gdal-config --version | cut -c 1-5 | xargs -I % pip install 'pygdal>=%.0,<=%.999' Is it possible to use above pipe´s return as version with pip module *or should I use just command module*? - name:

Re: [ansible-project] Working with Ansible Galaxy Roles

2018-10-16 Thread Mischa ter Smitten
I can really recommend submodules, but it's probably a bit more advance than requirements.yml. We manage over 150 roles this way and it's working like a charm. On Tuesday, October 16, 2018 at 6:37:21 PM UTC+2, Matt Davies wrote: > > Thanks for the prompt response Jonathan > > So the roles

[ansible-project] Re: Help with blockinfile module running against Proxmox

2018-10-16 Thread Arturo Martínez
Hello Troy, Only joined this group to confirm that your solution works, and say *thank you so much*. I spent a whole weekend trying to find workarounds for this issue, until I found your comment. All the best, Arturo On Saturday, March 10, 2018 at 11:03:20 PM UTC+1, Troy Cauble wrote: > > I

Re: [ansible-project] Working with Ansible Galaxy Roles

2018-10-16 Thread Jonathan Lozada De La Matta
not exactly. Each role will be in its own git repository then requirements.yml will list all the roles you need for that specific play. Makes it easier to manage the roles in different git repositories and not have other changes mixed together. On Tue, Oct 16, 2018 at 12:37 PM Matt Davies wrote:

Re: [ansible-project] Working with Ansible Galaxy Roles

2018-10-16 Thread ngonzal
You can also update ansible.cfg to point to one or more role directories. Which is nice if each of your roles is in a git repo, but you want to work on things locally without pushing up changes every time. See the roles_path option:

Re: [ansible-project] Re: AWS_EC2 plugin keyed_groups suffix option

2018-10-16 Thread Guy Knights
Never mind, I worked out that if I include the region (but not the boto_profile parameter) then it works. Not sure why it's not using the profile region defined in ~/.aws/config but it's not a big deal. On Monday, 15 October 2018 17:28:52 UTC-7, Guy Knights wrote: > > Great, thanks! That seems

Re: [ansible-project] include_role with passed variable defined by template fails

2018-10-16 Thread Dmitriy Panteleyev
Sorry, that was just a typo in my example. The filenames all match. On Tuesday, October 16, 2018 at 8:48:22 AM UTC-6, Matt Martz wrote: > > The template does not exist. You are using the wrong template file in > your lookup call: > > ``` > - stuff: "{{ lookup('template',

Re: [ansible-project] Working with Ansible Galaxy Roles

2018-10-16 Thread Matt Davies
Thanks for the prompt response Jonathan So the roles being separate git repos would then be git submodules? Is that the idea? I'll read up on requirements.yml now. Matt -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

Re: [ansible-project] Working with Ansible Galaxy Roles

2018-10-16 Thread Jonathan Lozada De La Matta
checkout requirements.yml and having each role in a seperate git repo. On Tue, Oct 16, 2018 at 12:26 PM Matt Davies wrote: > Hi Everyone > > There's about 10 developers working on our ansible codebase, configuring > approx 20 VM's, it's going to grow rapidly. > > We've just started working with

[ansible-project] Working with Ansible Galaxy Roles

2018-10-16 Thread Matt Davies
Hi Everyone There's about 10 developers working on our ansible codebase, configuring approx 20 VM's, it's going to grow rapidly. We've just started working with ansible galaxy roles and I was wondering if anyone has any links/tips/suggestions on how to manage the workflow? We'd like to be

Re: [ansible-project] Problem: regex should find the end of the line - take the next new line

2018-10-16 Thread Kai Stian Olstad
On 16.10.2018 12:34, Shlomit Afgin wrote: Hi, I have - name: update file1 with 0 in the end if it missing replace: backup: yes dest: /tmp/file1 regexp: '^(start of line.*[^0])$' replace: '\1 0' This add 0 to lines that start with "start of line". It's run okay

Re: [ansible-project] include_role with passed variable defined by template fails

2018-10-16 Thread Matt Martz
The template does not exist. You are using the wrong template file in your lookup call: ``` - stuff: "{{ lookup('template', 'role_one_template.j2') }}" ``` However, you have indicated the file is actually named: /roles/one/templates/role_one_template_file.j2 On Mon, Oct 15, 2018 at 11:06

[ansible-project] template error: AnsibleUndefinedVariable

2018-10-16 Thread christian . tremel
hi, i have a simple template which is driving me nuts, as it throws an bland error. what in blazes does that mean? the template: {{ ansible_managed }} driftfile /etc/ntp.drift tracefile /etc/ntp.trace {% if inventory_lparname not in groups['DMZ_HOST'] %} server 10.0.0.1 server some_host {%

[ansible-project] Re: shut unused cisco switch interfaces

2018-10-16 Thread Brad Van Orden
I don't currently have any switches to test against, but I would think you can get the interface status with ios_facts with the ansible_net_interfaces giving you a hash of the interface status. From that, you should be able to use ios_interface to mark it down. ansible check of IOS interfaces

[ansible-project] Problem: regex should find the end of the line - take the next new line

2018-10-16 Thread Shlomit Afgin
Hi, I have - name: update file1 with 0 in the end if it missing replace: backup: yes dest: /tmp/file1 regexp: '^(start of line.*[^0])$' replace: '\1 0' This add 0 to lines that start with "start of line". It's run okay if there are no empty lines between. If

Re: [ansible-project] Is there free gui interface or easy way to check Ansible's log

2018-10-16 Thread Jonathan Lozada De La Matta
ansible ARA might be what you are looking for. On Tue, Oct 16, 2018 at 2:44 AM Julian Kriel wrote: > Indeed, > > Look into AWX - Its Ansible tower open source project. > > Great management platform > > On Tue, Oct 16, 2018 at 8:20 AM Shlomit Afgin > wrote: > >> Hi, >> >> I'm in a middle of

[ansible-project] Unable to change regional settings on Windows Server

2018-10-16 Thread ameya agashe
Hi Guys, I want to change regional settings post-Windows Server Provisioning, namely "*Display language*" and "*Input Language*" for a) *Current User*, b) *Welcome Screen*, and c) *New user *to *"English Australia"* [image: Regional-Settings.jpg] I have the below module, unfortunately, it

Re: [ansible-project] Is there free gui interface or easy way to check Ansible's log

2018-10-16 Thread Julian Kriel
Indeed, Look into AWX - Its Ansible tower open source project. Great management platform On Tue, Oct 16, 2018 at 8:20 AM Shlomit Afgin wrote: > Hi, > > I'm in a middle of building Ansible on our system. > I would like to run it every day to check few servers. > Is there any good way to follow

[ansible-project] Is there free gui interface or easy way to check Ansible's log

2018-10-16 Thread Shlomit Afgin
Hi, I'm in a middle of building Ansible on our system. I would like to run it every day to check few servers. Is there any good way to follow the Ansible's logs to check failed? Is there any free GUI I can use with Ansible? The Ansible's run give output and I want to get also only the