Re: [ansible-project] UNREACHABLE!

2023-11-17 Thread Martin Etcheverry
Hey Vasily you finally solved the problem? El lun, 13 nov 2023 a las 14:07, Prabhakar P () escribió: > Ssh key folder permissions issue set for 700 for folder and authorized > keys 644 > > On Mon, Nov 13, 2023 at 7:47 AM Василий Арутюнов > wrote: > >> Hello, pls help me understand this e

Re: [ansible-project] UNREACHABLE!

2023-11-13 Thread Martin Etcheverry
hi, you are trying to connect to the 193.84.2.### with root? Is root allowed to ssh in that host (seems a bad practice anyway)? El lun, 13 nov 2023 a las 10:47, Василий Арутюнов () escribió: > Hello, pls help me understand this error; I've been trying to fix it for > the second day and can't figu

Re: [ansible-project] JOB | Linux Sysadmin (London, UK)

2023-06-05 Thread Martin Etcheverry
My bad! sorry! El dom, 4 jun 2023 a las 10:12, Nico Kadel-Garcia () escribió: > On Fri, Jun 2, 2023 at 10:20 AM James Tobin wrote: > > > > Hello, I'm working with an employer that is looking to hire a Linux > > sysadmin with terraform, ansible and python experience for an > > infrastructure posi

Re: [ansible-project] JOB | Linux Sysadmin (London, UK)

2023-06-02 Thread Martin Etcheverry
Hi James , for this job, is needed to be in person, or could be remote? Best regards Martin El vie, 2 jun 2023 a las 11:20, James Tobin () escribió: > Hello, I'm working with an employer that is looking to hire a Linux > sysadmin with terraform, ansible and python experi

Re: [ansible-project] Re: Changing serial mode per task in playbook?

2022-02-04 Thread Martin Božič
Thanks for both of the suggestions! I tried both and figured out that multiple plays in one playbook with the second play using "serial: 1" works for me alright. Thanks, Martin V V čet., 3. feb. 2022 ob 17:18 je oseba Brian Coca napisala: > also 'throttle', it is not t

Re: [ansible-project] Ansible Cant find Debian Apt Package for Multi Playbook/Tasks Runs with Galaxy FreeIPA Install

2022-02-03 Thread Martin Sharp
of repeating cycles, waiting for the automatic update to finish. > Once the command ends with no error (or with a different error), then > you can continue. > > El mié, 2 feb 2022 a las 13:32, Martin Sharp () > escribió: > > > > I have a single node deployment anisbl

[ansible-project] Changing serial mode per task in playbook?

2022-02-03 Thread Martin Božič
rallel execution and one with serial? Or am I wrong and it can be done within one playbook? Maybe it's possible to work around the problem with include_tasks or import_tasks? Martin -- You received this message because you are subscribed to the Google Groups "Ansible Project" gr

[ansible-project] Ansible Cant find Debian Apt Package for Multi Playbook/Tasks Runs with Galaxy FreeIPA Install

2022-02-02 Thread Martin Sharp
I have a single node deployment anisble playbook that runs via rundeck to stage cloud-init, pxe installed, 20.04 Ubuntu systems with ubuntu desktop for an idm domain with a standard configuration. The issue I am having is that on first run after the pxe process we get a "No package matching 'fr

[ansible-project] Re: k8s module - operator install - wait_condition does not wait for readiness of operator

2021-08-06 Thread Martin Evans
AM UTC+1 Martin Evans wrote: > Hi, > > When I am installing an Operator with a wait condition such as: > > wait_condition: type: "CatalogSourcesUnhealthy" > status: "False" > reason: "AllCatalogSourcesHealthy" > > The role conti

[ansible-project] k8s module - operator install - wait_condition does not wait for readiness of operator

2021-08-06 Thread Martin Evans
ther than CatalogSourcesUnhealthy, can I put in an short delay (not ideal but might be an acceptable workaround) ? Running on OpenShift 4.7 Ansible 2.9.24 I have tried both RH yum installed Ansible and pip3 And, kubernetes.core ommunity.kubernetes Thanks, Martin -- You received this me

Re: [ansible-project] Any use case of Storage Automation w.r.t Netapp, Unity, and Pure

2021-06-30 Thread Paul Martin
e25-4bde-b305-d25b3b64cb0dn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Paul Martin -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails fro

Re: [ansible-project] Security updates

2021-05-25 Thread Martin Krizek
of ansible releases? > FWIW release changelogs do have a dedicated section for security fixes, for example see: https://github.com/ansible/ansible/blob/stable-2.11/changelogs/CHANGELOG-v2.11.rst#security-fixes. Thanks, Martin -- You received this message because you are subscribed to the Goog

Re: [ansible-project] short-circuit eval in templated string works only sometimes?

2021-05-18 Thread Martin Krizek
to change this behavior, see https://github.com/ansible/ansible/issues/58835 and https://github.com/ansible/ansible/issues/56017 (or an interesting example that was filed recently in https://github.com/ansible/ansible/issues/74594). The problem is that while changing this might result in expec

[ansible-project] Ansible Inventory Security (all)

2021-05-06 Thread Martin Parrella
Hi there! Is there any way to overwrite the 'all/*' keyword in Ansible inventory? How can we prevent someone to run something nasty (intentionally or by mistake) over all our inventory? We did a couple of tests using a dynamic inventory, but no luck. As a workaround, we are thinking to force

Re: [ansible-project] Proxmox

2020-12-14 Thread Martin Etcheverry
Hi Pim , maybe this can work for you; you can run a command inside the container with something like that: - name: run command hosts: proxmox tasks: - name: Run command in container lxc_container: name: 133 state: started container_command: service ssh restart El dom, 13 dic 2020 a las 19:32, Pim

Re: [ansible-project] Linux lun mount and format/filesystem

2020-10-08 Thread Paul Martin
he web visit > https://groups.google.com/d/msgid/ansible-project/256cb4ce-e826-43d4-b70e-87cfbe49c0e3n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/256cb4ce-e826-43d4-b70e-87cfbe49c0e3n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > --

[ansible-project] problem using uri module with proxmox api

2020-09-16 Thread Martin Etcheverry
nt-Type: "application/json" As you can see in the body , i am trying anything that pases on my mind . And i still receiving a "Status code was 401 and not [200]: HTTP Error 401: No ticket" I understand that i am doing the request in bad way , but i don't fi

Re: [ansible-project] Help with async tasks.

2020-09-01 Thread Martin Etcheverry
well other option (i used only once) is run the shell command with gnu parallel . its pretty amazing! but i pretty stiff learning curve. maybe you could , give it a chance. best regards! El mar., 1 sept. 2020 a las 4:19, Guannan Sun () escribió: > Thank you for your response. > I've tried to add

Re: [ansible-project] Help with async tasks.

2020-08-31 Thread Martin Etcheverry
Hi ! maybe something like this : https://medium.com/developer-space/parallel-playbook-execution-in-ansible-30799ccda4e0 El lun., 31 ago. 2020 a las 6:57, Guannan Sun () escribió: > Thank you for your response. > Well, in my condition, I using 'create_site' role to create a site in a > netbox. It

[ansible-project] ansibot starts auto-closing collection issues and pull requests in ansible/ansible

2020-08-12 Thread Martin Krizek
s off please reach out on IRC or mailing list to get help figuring out the correct place for the issue/PR. For further information please see https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md Thanks, Martin [0] https://github.com/ansible/ansible/pull/71179 [1]

Re: [ansible-project] Can a AWX job template can be called from Ansible task ?

2020-08-06 Thread Paul Martin
48c-968da140c6b6o%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Paul Martin -- 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 ema

Re: [ansible-project] Use lookup/dynamic variable names in jinja2 template

2020-06-25 Thread Martin Krizek
- hosts: localhost gather_facts: yes vars: top_level: Fedora: key: value tasks: - debug: msg: "{{ top_level[ansible_distribution]['key'] }}" On Thu, Jun 25, 2020 at 3:22 PM Willem Bos wrote: > > Hi Martin, > > Thanks for your q

Re: [ansible-project] Use lookup/dynamic variable names in jinja2 template

2020-06-25 Thread Martin Krizek
: Fedora: key: value tasks: - debug: msg: "{{ lookup('vars', ansible_distribution)['key'] }}" On Thu, Jun 25, 2020 at 1:47 PM Willem Bos wrote: > > Hi Martin, > > Thanks, but I'm not sure varnames is useful to me. > > I kn

Re: [ansible-project] Use lookup/dynamic variable names in jinja2 template

2020-06-24 Thread Martin Krizek
You can use the varnames lookup to get variable names that match given pattern: https://docs.ansible.com/ansible/latest/plugins/lookup/varnames.html On Wed, Jun 24, 2020 at 12:33 PM Willem Bos wrote: > > Hi, > > The playbook below should generate a file with the content: > a,b > ssh_host_key > ss

Re: [ansible-project] What does the output from the dynamic inventory software look like?

2020-06-10 Thread Martin Ward
|\/|artin On Tuesday, 9 June 2020 21:53:38 UTC+1, Vladimir Botka wrote: > > On Tue, 9 Jun 2020 13:20:19 -0700 (PDT) > Martin Ward > wrote: > > > ... ideally after prompting the user for this information. > > ... ask the user for the IP address of the remote server an

Re: [ansible-project] What does the output from the dynamic inventory software look like?

2020-06-10 Thread Martin Ward
there is a JSON schema file describing the JSON data > structure for inventory scripts located at > https://github.com/ansible/ansible/blob/devel/examples/inventory_script_schema.json > > On Tue, Jun 9, 2020 at 3:20 PM Martin Ward > > wrote: > >> Hi, >> >> I

[ansible-project] What does the output from the dynamic inventory software look like?

2020-06-09 Thread Martin Ward
Hi, I am running Ansible 2.9.7 and am looking at the dynamic inventory scripts. I don't have any of the various software listed (AWS, OpenStack etc) in the examples section and I need something where I can automatically set the remote IP address at the time that the playbook is executed, ideall

[ansible-project] Re: Problem connecting to Windows Server 2008R2 host

2020-04-28 Thread Martin Lucas
r\nobject.\r\nAt line:7 char:2\r\n+ &$exec_wrapper\r\n+ ~\r\n+ CategoryInfo : InvalidOperation: (:) [], RuntimeException\r\n+ FullyQualifiedErrorId : BadExpression\r\n ", "module_stdout": "", "msg": "MODULE F

[ansible-project] Problem connecting to Windows Server 2008R2 host

2020-04-28 Thread Martin Lucas
Specified: (:) [], MethodInvocationException\r\n+ FullyQualifiedErrorId : ParseException\r\n \r\nThe expression after '&' in a pipeline element produced an object that was not \r\nvalid. It must result in a command name, a script block, or a CommandInfo \r\nobject.\r\nAt line:7 char:2\r\n

Re: [ansible-project] ternary clarification needed

2020-03-26 Thread Martin Krizek
On Thu, Mar 26, 2020 at 7:55 AM Davide Scrimieri wrote: > > Hello, > > Whenever a ternary is used are both conditions evaluated regardless ? > > For example, I want to convert "my_other_var" to an object only if it is > passed as as string, otherwise I don't want to touch the object, and leave it

Re: [ansible-project] Simple Math with String to Int

2020-03-02 Thread Martin Krizek
g, and > perform math and output an INT more simply? Jinja2 native types introduced in Ansible 2.7 should be what you want: https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-jinja2-native Martin -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] Ansible when logic to determine whether to use yum or dnf to install packages on ansible_os_family='RedHat'

2020-02-18 Thread Martin Krizek
On Tue, Feb 18, 2020 at 11:30 AM Vladimir Botka wrote: > > On Tue, 18 Feb 2020 01:25:18 -0800 (PST) > Donald Jones wrote: > > > Up until now I've been making a logic decision with my ansible roles based > > upon the ansible_os_family, to run the appropriate module for yum > > ('RedHat') or apt ('

[ansible-project] Re: exporting grafana dashboards (containerised) using ansible

2020-01-29 Thread Dylan Martin
That's a pretty vague question. Could you tell us what you've done and where you are stuck? On Monday, January 27, 2020 at 7:56:59 AM UTC-8, Vishal Bobade wrote: > > Hello, > > I am looking forward to export grafana json dashboards using ansible. > Could you please help me on how can I use dock

[ansible-project] Re: Ansible WinRM dont run concurrent process

2020-01-29 Thread Dylan Martin
How are you making them concurrent? IE what does your play look like? If you have three conventional separate ansible tasks, that won't work. You'd need a single task that launches all 3 or use async. https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html If you're already

[ansible-project] Re: Quick question- how to run ansible playbook on Saturday night at 12 PM and save the output in amazon s3 bucket

2020-01-29 Thread Dylan Martin
What environment are you in? I have linux servers in a datacenter. I'd write a shell script to run the play, output to a file and copy the file to s3. Then I'd use cron to schedule the job. Of course, you'd need to use a passwordless ssh key or set up ssh-agent ahead of time to work with cro

[ansible-project] waits for password when I don't want it to

2020-01-29 Thread Dylan Martin
Hi all. I have an environment with several hundred unreliable machines. Sometimes they're just dead, sometimes they're misconfigured. I always encounter some where the keys in my ssh-agent don't work and it prompts me to enter the password and it waits for me to hit enter a bunch of times be

Re: [ansible-project] Re: Help with meta end_host

2020-01-28 Thread Martin Krizek
Hello, I have opened a pull request that should fix the issue at https://github.com/ansible/ansible/pull/66851. Thanks! Martin On Tue, Jan 28, 2020 at 12:59 PM Aleksandr Smirnov wrote: > > I could just confirm such behavior, seems it's a bug in meta: end_host, what > such a

Re: [ansible-project] authorized_key : How to put default value or bypass it

2020-01-23 Thread Martin Krizek
Just skip the item when ssh_key is not available (`false` in your example): - name: "add public keys to users" authorized_key: user: '{{ item.name }}' key:'{{ item.ssh_key }}' with_items: '{{ user }}' when: item.ssh_key On Thu, Jan 23, 2020 at 9:25 AM Hieronymus wr

Re: [ansible-project] ignore -has no attribute

2020-01-23 Thread Martin Krizek
Use "default" filter: https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#defaulting-undefined-variables Example: - hosts: localhost gather_facts: no vars: d: key: value tasks: - debug: msg: "{{ d.missing_attr | default('default_value') }}" On Thu

[ansible-project] win_timezone change does not survive reboot

2019-11-27 Thread Dylan Martin
My timezone was Pacific Standard Time. I used the win_timezone module to set it to UTC. I appeared to work. The TZ was UTC. After reboot, the TZ was Pacific Standard Time again. Is this expected? Is there a way to make TZ change persist after reboot? -- You received this message because y

[ansible-project] Check if file exists on any remote

2019-07-04 Thread Martin Wittwer
node. Is there a way to access a variable of other nodes during a play or make it available for other nodes? Thanks in advance for any help. Best, Martin -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this

[ansible-project] Weird Windows Path Problem

2019-06-23 Thread Dylan Martin
Hi, I'm using Ansible 2.8 on Ubuntu and I'm trying to make a directory to a windows box. But wait! I hear you say, what about https://docs.ansible.com/ansible/latest/user_guide/windows_usage.html#path-formatting-for-windows ? Read it. If I use an unquoted or single quoted string, like so

Re: [ansible-project] Re: loop

2019-06-12 Thread Martin Krizek
Hello, you can find an example of using `first_found` with `loop` here: https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html#selecting-files-and-templates-based-on-variables. Thanks, Martin On Wed, Jun 12, 2019 at 2:39 PM Ryad karkar wrote: > > Hi, > > You

Re: [ansible-project] tower ansible template: how to pass parameters to a python script

2019-06-11 Thread Martin Krizek
Hello, for passing parameters to the script please see the first example on https://docs.ansible.com/ansible/latest/modules/script_module.html#examples. If you want to pass those parameters from variables then yes you need to use Jinja2. Thanks, Martin On Mon, Jun 10, 2019 at 4:45 PM Gilles

Re: [ansible-project] remote module (vmware_guest_find) does not support check mode

2019-06-10 Thread Martin Krizek
Hello, how are you running 'ansible-playbook' command? If you are passing "-C" or "--check" then the message is expected; you might want to create a feature request for vmware_guest_find to support check_mode. Otherwise it might be a bug. Thanks, Martin On Mon, J

Re: [ansible-project] Re: I can't edit jira issue with ansible

2019-06-07 Thread Martin Krizek
Or just use 'implicit localhost' - https://docs.ansible.com/ansible/latest/inventory/implicit_localhost.html. On Fri, Jun 7, 2019 at 1:16 PM Jonathan Lozada De La Matta < jloza...@redhat.com> wrote: > probably need connection: local or delagate_to: localhost in the playbook > > On Fri, Jun 7, 201

Re: [ansible-project] Tower license query

2019-06-07 Thread Martin Krizek
Hello, please contact official support for questions about your license - https://docs.ansible.com/ansible-tower/3.3.1/html/installandreference/updates_support.html#support Thanks, Martin On Fri, Jun 7, 2019 at 8:24 AM rajthecomputerguy wrote: > > Hi Team, > > We bought tower

[ansible-project] Raw module invoking /usr/bin/python

2018-09-24 Thread Dylan Martin
I assume I broke a config somewhere because this makes no sense: $ ansible -vvv '*' -i hosts.isp-east-stage -M raw -a 'whoami' -u ubuntu -l X.X.X.X ansible 2.5.1 config file = /home/dmartin/.ansible.cfg configured module search path = [u'/home/dmartin/.ansible/plugins/modules', u'/usr/shar

Re: [ansible-project] Mail Callback

2018-09-07 Thread Martin Krizek
On Fri, Sep 7, 2018 at 1:15 PM Martin Krizek wrote: > > The traceback you're getting says "unexpected keyword argument > 'flags'". That argument was added in Python 2.7 which is also the > minimal Python version supported by Ansible on the controller side.

Re: [ansible-project] Mail Callback

2018-09-07 Thread Martin Krizek
The traceback you're getting says "unexpected keyword argument 'flags'". That argument was added in Python 2.7 which is also the minimal Python version supported by Ansible on the controller side. M. -- You received this message because you are subscribed to the Google Groups "Ansible Project"

[ansible-project] Check if disk is in use before partitioning?

2018-08-10 Thread Dylan Martin
I all. I've used parted and lvm (lvg & lvol) to set up machines, but I recently broke a system when I repartitioned a disk that was already in use. (Wooops!) Does anyone have a good idea how to determine if a block device is already in use? By "in use" I mean, mounted in some way. Thanks!

Re: [ansible-project] Environment variables unavaiable

2018-03-26 Thread Martin Simovic
Yes, still according to man pages /bin/sh started as login shell should source /etc/profile (as it does on e.g. CENTOS) On Monday, 26 March 2018 13:44:31 UTC+2, Kai Stian Olstad wrote: > > On 26.03.2018 12:10, Martin Simovic wrote: > > However, this is happening when I use command

Re: [ansible-project] Environment variables unavaiable

2018-03-26 Thread Martin Simovic
use (I know that /bin/sh is symlink to /bin/bash on those distributions) ? On Monday, 26 March 2018 12:02:35 UTC+2, Kai Stian Olstad wrote: > > On 26.03.2018 11:31, Martin Simovic wrote: > > I am observing following behaviour using ansible on set of Ubuntu-1604, > > SLES-12

[ansible-project] Environment variables unavaiable

2018-03-26 Thread Martin Simovic
les (defined in /etc/profile) are available for both these modules for SLES and CentOS distributions. Seems as if ansible run shell as login shell for Sles and Centos, and non-login shell for Ubuntu. This inconsistency is killing me. Anyone came across this? Possible solution? Many Thanks Martin. -

[ansible-project] Re: do_dictsort() got an unexpected keyword argument 'reverse'

2018-02-13 Thread Martin Cigorraga
Matt, I can't share the details as it wasn't me the one who made the implementation, but we were able to adapt the Jinja2 2.10 filter plugin by converting it to an Ansible v2 filter plugin. Cheers -- You received this message because you are subscribed to the Google Groups "Ansible Project"

Re: [ansible-project] do_dictsort() got an unexpected keyword argument 'reverse'

2018-01-26 Thread Martin Cigorraga
ed: http://jinja.pocoo.org/docs/dev/templates/#reverse > > On Fri, Jan 26, 2018 at 9:35 AM, Martin Cigorraga > wrote: > >> Hi everyone, >> >> We are using a Jinja2 template to populate a configuration file, based on >> the information Ansible feeds it on runti

[ansible-project] do_dictsort() got an unexpected keyword argument 'reverse'

2018-01-26 Thread Martin Cigorraga
Hi everyone, We are using a Jinja2 template to populate a configuration file, based on the information Ansible feeds it on runtime: ### Main Processes {% for k, v in some_conf | dictsort() %} cmdline -c /etc/some_tool/some_agent-{{ k }}.conf -o /var/log/some_tool/ some_agent.log {% e

[ansible-project] Re: Utilizing win_iis_webbinding to update IIS certs

2017-11-17 Thread John Martin
I was able to successfully import the module, naming it win_dsc_devel. I verified it with an adhoc call, passing no parameters, confirming that Ansible sees the module. The problem I'm having, using the win_dsc example of the module to create an IIS website is that I get errors when attempting

[ansible-project] Re: Utilizing win_iis_webbinding to update IIS certs

2017-11-15 Thread John Martin
This is great information. Thank you for your help. I will read into the links provided and see if I can work out a resolution with DSC. On Tuesday, November 14, 2017 at 8:12:21 PM UTC-5, Jordan Borean wrote: > > The win_iis_* modules are fairly old and have a few bugs associated with > them. I

[ansible-project] Utilizing win_iis_webbinding to update IIS certs

2017-11-14 Thread John Martin
Hello, I'm new to Ansible and have been giving it some attention in my test environment to see how feasible it is to utilize in production... Mainly to provision/configure/manage 30 or so Windows web-servers. I was able to copy and install my cert and bind it to my site with win_iis_webbinding

Re: [ansible-project] How to debug/test ansible module. Python interactive mode (pdb)

2017-07-25 Thread Martin Krizek
Hi, Using epdb instead of pdb should do the trick, so "import epdb; epdb.serve()" and then you connect via "epdb.connect()" from a python shell. See https://pypi.python.org/pypi/epdb/. Martin On Tue, Jul 25, 2017 at 4:12 PM, russell choudhury wrote: > Hi, I wan

[ansible-project] Ansible role variables

2017-07-13 Thread Martin Jablečník
I have Ansible 2.3.0.0 with this roles in playbook: - { role: bwt-container, tags: ['bwt_en', 'bwt'], vars: { app_lang: "en" } } - { role: bwt-container, tags: ['bwt_de', 'bwt'], vars: { app_lang: "de" } } BWT application have various languages, which I would like define in vars. But when

[ansible-project] Ansible role variables

2017-07-13 Thread Martin Jablečník
Hello I have Ansible 2.3.0.0 with this roles in playbook: - { role: bwt-container, tags: ['bwt_en', 'bwt'], vars: { app_lang: "en" } } - { role: bwt-container, tags: ['bwt_de', 'bwt'], vars: { app_lang: "de" } } BWT application have various languages, which I would like define in vars. But

[ansible-project] vmware_guest module

2017-06-21 Thread Martin Schiøtz
VMware license is needed. Does VMware vSphere Essentials Kit have the required license for Ansible vmware_guest to be used? Cheers! Martin -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

[ansible-project] How to prepare Ansible inventory, playbook and configuration file used by Ansible module using Ansible/Jinja2?

2017-06-07 Thread Martin
checks out the latest revision of mentioned "routers" file and configuration template. Now is there a better way to do all this without bash? While this works, I'm feeling that I'm doing it wrong and I'm relying heavily on bash. Is it possible to do all this in Ansible/Ji

Re: [ansible-project] Struggling with optional arguments to a playbook

2017-05-25 Thread Martin Brooks
Thanks for that. I eventually managed to get it working via this method: --- - hosts: all tasks: - set_fact: username: "{{ username | default(ansible_user_id) }}" - set_fact: keyfile: "{{ keyfile | default('/home/' + username + '/.ssh/id_rsa.pub') }}" - set_fac

[ansible-project] Struggling with optional arguments to a playbook

2017-05-25 Thread Martin Brooks
7;, got '}'. String: {{ username if username is defined else {{ansible_user_id}} }}"} I apologise if this is a simple error, but I've been bashing at it for hours with no success and google isn't being forthcoming. Where exactly is it expecting a ":" and why? T

Re: [ansible-project] template backup names?

2017-04-24 Thread Dave Martin
Ahhh, thanks. I can see that. It's still makes them hard to sort out, though. On Mon, Apr 24, 2017 at 3:24 AM Dick Davies wrote: > I'm guessing its intended to prevent collisions rather than as an audit > tool? > > On 21 April 2017 at 14:58, Dave Martin wrote: > >

[ansible-project] template backup names?

2017-04-23 Thread Dave Martin
So, why is there a process ID in the extension added to the backup file created by a template action? Any why not put it at the end so they sort correctly? The process id is ephemeral - by the time you go look a the file, that process is long gone. What use is it? -- -- Nobody believed that I

Re: [ansible-project] "check_mode" without physical access to hosts

2017-04-23 Thread Martin Dietze
Am Freitag, 21. April 2017 04:11:53 UTC+2 schrieb Brian Coca: > > do you just want a --sytnax-check? check_mode is not designed for this use > case. > > I normally use 'mock inventories' when testing playbooks (they all > have ansible_host point to localhost or local vms). > No syntax check.

Re: [ansible-project] "check_mode" without physical access to hosts

2017-04-20 Thread Martin Dietze
Am Freitag, 21. April 2017 01:32:24 UTC+8 schrieb Brian Coca: to 'not connect' to a host, just don't include it in the target (via > hosts:/--limit or inventory). > >From this I read that there is no way to simulate a playbook against a given inventory without connecting to the inventory's hos

[ansible-project] "check_mode" without physical access to hosts

2017-04-20 Thread Martin Dietze
In a project for which I have created an ansible-based installer the productive system is big, i.e. about 100 hosts. For organising my deployments I keep inventory files for all target systems and I make extensive use of groups. Now after a productive deployment (which I don't do personally)

Re: [ansible-project] Multiple users running ansible on the same host causes blocking

2017-02-28 Thread Andrew Martin
Brian, Thanks, these are good ideas: Are you using a common user? > no, separate users > do you have custom callbacks or facts cache setup to a absolute path? > yes, but the custom callback path is relative > are your contol persist settings relative or absolute? absolute; I have changed this

[ansible-project] Multiple users running ansible on the same host causes blocking

2017-02-27 Thread Andrew Martin
I am running Ansible 2.2.0 on Ubuntu 16.04. When I have more than one user running a playbook on hosts all from this same server, I sometimes observe this behavior: -user 1 starts running a playbook on host A, playbook is running along fine -user 2 starts running a playbook on host B, p

Re: [ansible-project] Unable to upgrade to Ansible 2.2 on Mac

2016-12-28 Thread Georges Martin
I have no Macs around for the moment to reproduce your issue, but one advice: don't try to upgrade libraries from the System Python. One solution is to create a Virtualenv for Ansible and install all Ansible dependencies in it. Another is to use a package manager like MacPorts or Homebrew. HT

Re: [ansible-project] ansible using versioned playbooks ala r10k

2016-12-08 Thread James Martin
Answer is to use requirements.yml: http://docs.ansible.com/ansible/galaxy.html#id10 On Thu, Dec 8, 2016 at 1:10 PM, Vince Skahan wrote: > Working in a puppet shop, I have to admit r10k is pretty cool. It lets us > set up 'versioned' environment definitions that we can apply to the right > target

Re: [ansible-project] odd result after migrating postgresql database off-tower

2016-11-15 Thread James Martin
I could only assume you are referring to this 2 year old script I wrote: https://github.com/jsmartin/ansible-tower-db-migrator. That was created long before Ansibe Tower had a proper backup restore mechanism. I suggest you contact Ansible support and use the official method. On Tue, Nov 15, 2016

Re: [ansible-project] Roles purpose

2016-08-25 Thread Dave Martin
Even in a small environment, roles are quite useful. I use them for clusters as small as 4. Roles do not have to be 1:1 to host groups (but can be). You might have roles apache, and postgres. Each of those would install the base packages on top of your basic config, which might be handled by yo

[ansible-project] nxos_template module time-out when banner motd is broken into several lines

2016-07-28 Thread Martin Baro
Running ansible 2.1.0.0 and nxos 7.0.3.I2.2b Do you know any workaround for this issue? Thanks, Martin -- 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

[ansible-project] Re: Role dependencies gets skipped in ansible 2

2016-07-25 Thread Martin Studer
Hi, I'm experiencing exactly the same issue. I found there is a property "allow_duplicates" (see http://docs.ansible.com/ansible/playbooks_roles.html) but that doesn't seem to work for dependent roles ... Best regards, Martin On Friday, June 17, 2016 at 1:36:48 AM UT

[ansible-project] Re: [os_port] Add allowed-address-pairs to an existing openstack server port

2016-06-10 Thread &#x27;Martin Smithson' via Ansible Project
If you are using Ansible 2.1 you should be able to use the os_port_facts module. Once you have the id of the port, you can use the os_port module to update the allowed_address_pairs, for example: - name: Update the allowed_address_pairs for the original port local_action: module: os_po

Re: [ansible-project] Ansible reads all files in host_vars and group_vars instead of just the ones for the specified hosts

2016-05-17 Thread Andrew Martin
, that isn't targeted by the play, which is > often done. > > On Tue, May 17, 2016 at 4:11 PM, Andrew Martin > wrote: > >> Hello, >> >> I am running ansible 2.0.2 on Ubuntu 14.04. I have several vaulted >> host-specific or group-specific files in host_vars or

[ansible-project] Ansible reads all files in host_vars and group_vars instead of just the ones for the specified hosts

2016-05-17 Thread Andrew Martin
Hello, I am running ansible 2.0.2 on Ubuntu 14.04. I have several vaulted host-specific or group-specific files in host_vars or group_vars, so whenever I run "ansible-playbook", I pass the "--ask-vault" option. I noticed some odd behavior - if I run with "--ask-vault" and strace the "ansible-p

Re: [ansible-project] How to pass inventory information to modules

2016-03-30 Thread James Martin
Miroslav, Here is one work around -- design your inventory something like this: [routers] router1 ansible_connection=local router_user=foo router_password=bar router2 ansible_connection=local router_user=baz router_password=biz router3 ansible_connection=local router_user=fax router_passwor

Re: [ansible-project] Re: eos_command module waitfor - IP address in json structure

2016-03-23 Thread Martin Baro
Thanks Peter, much appreciated. Also thanks for the great network webinar, was really informative. Martin On Wednesday, March 23, 2016 at 7:40:56 AM UTC+1, Peter Sprygada wrote: > > (ansible)[ansible-eos]$ cat route.yaml > --- > - hosts: veos01 > gather_facts: no > >

[ansible-project] Re: eos_command module waitfor - IP address in json structure

2016-03-22 Thread Martin Baro
Hi Uditha, Thanks for the reply. I've simplified the problem a bit (just removed the variable) and with removing the "" around the whole statement I managed to preserve the quotes. Unfortunately it didn't solve the problem: waitfor: - result[0].vrfs.default.routes[\'1.2.3.4/30\'].hard

[ansible-project] Re: eos_command module waitfor - IP address in json structure

2016-03-21 Thread Martin Baro
:07:43 PM UTC+1, Uditha Desilva wrote: > > The dotted form is a shorthand for using braces, so maybe this will work: > >- "result[0].vrfs.default.routes['{{ route }}'].hardwareProgrammed > eq true" > > On Monday, 21 March 2016 16:56:35 UTC, Martin

[ansible-project] eos_command module waitfor - IP address in json structure

2016-03-21 Thread Martin Baro
ammed": true, "kernelProgrammed": true, "routeAction": "forward", "routeType": "connected", "vias": [ { "

Re: [ansible-project] Re: But in iptables module?

2016-03-20 Thread Martin Terp Jensen
I belive you need to use "match: conntrack" instead of "match: state" when using ctstate On Sun, Mar 20, 2016 at 6:41 AM, Dejay Clayton wrote: > Looks like a bug to me. > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe

[ansible-project] Re: But in iptables module?

2016-03-20 Thread Martin Terp Jensen
I belive you need to use "match: conntrack" instead of "match: state" when using ctstate On Friday, March 18, 2016 at 10:07:49 PM UTC+1, Joshua Kugler wrote: > > I'm trying to use the iptables module, and I *think* I'm hitting a bug. > Wanted > a sanity check before I open a bug report. This is

Re: [ansible-project] Executing python script on ansible master once playbook finishes

2016-02-22 Thread Martin Schenk
DUDE! thank you so much! ^^ it is exactly what i was looking for! hell yeah ;D again, thank you very much Am Montag, 22. Februar 2016 14:56:43 UTC+1 schrieb Brian Coca: > > something like this: > > - name: run script locally # can also use the script module >shell: /path/to/script >de

[ansible-project] Executing python script on ansible master once playbook finishes

2016-02-22 Thread Martin Schenk
. Best regards, Martin Playbook --- # instance facts linux - hosts: Linux become: yes become_method: sudo roles: - nodeInfoLinux Role tasks: --- # tasks file for nodeInfo - name: Fill template with server information template: src=setup.j2 dest=/tmp/facts-{{ansible_hostname}} - nam

[ansible-project] Using "when" with dependent roles

2016-02-01 Thread Andrew Martin
Hello, I recently upgraded to Ansible 2.0 and have noticed a change in behavior with how dependent roles in meta/main.yml are executed. For example: dependencies: - { role: role1, when: trigger } - { role: role2, when: not trigger } In Ansible 1.9, I could set trigger == True or trigger == Fal

[ansible-project] Whitespace in multi-line variables on ansible 2.x

2016-01-19 Thread Andrew Martin
Hello, When creating multi-line variables, I would often use the following technique to insert tabs in ansible 1.x: myvar: | {{'\t'}}one {{'\t'}}two {{'\t'}}three This would result in the 3 lines being indented by a tab character in the resulting file. However this does not seem to work i

[ansible-project] Re: Management of multiple exclusive authorized_keys entries, for multiple users

2015-12-11 Thread Dylan Martin
Right of the top of my head, put user specific stuff in a dict in vars file (or conditional include a file for each user), so you have a dict that's populated differently based on the value of a "user" var. Then in a dependencies section in a meta/main.yaml, you just do { role: sshrolename, use

[ansible-project] Re: How to make an item in with_items conditional?

2015-12-11 Thread Dylan Martin
I've done it by having two lists in group vars files and doing a group_by On Friday, December 11, 2015 at 9:11:16 AM UTC-8, Marc Abramowitz wrote: > > Take this playbook: > > - hosts: mt1-dummys101 > tasks: > - name: Install apt packages > sudo: true > apt: pkg={{ item }} >

[ansible-project] Re: Deploying AWS infra with CloudFormation and provisioning application in same playbook

2015-12-07 Thread James Martin
I would tag the instances in your CF template, then reference those tagged hosts by the inventory groups that are created with the ec2.py dynamic inventory script. If you do this in two separate ansible-playbook runs, you won't need to do anything special, the inventory will reflect the newly

[ansible-project] Re: FAILED => Missing sudo password when NO SUDO PASSWORD is needed

2015-11-11 Thread Dylan Martin
Oh, another important thing about sudo! Don't use wildcards in a sudoers file if you care about the args your user passes! You cannot specify how many args are allowed, so no matter how tightly you construct the wildcard, the user can always add more args. Either use literal commands in the

[ansible-project] Role do something after handler?

2015-11-11 Thread Dylan Martin
Hi all, I have a strange one that I hope you can help me with. I'm trying to make a role for systemd service unit files. This is the newfangled replacement for good ol' sysV init scripts in Rhel7, any recent Fedora and a lot of other linux distros. The workflow is supposed to go something like

[ansible-project] ansible-galaxy init and metadata values

2015-10-16 Thread Dylan Martin
Hi everyone. I expected this functionality to exist, but I can't find it so either it does exist and someone can gently point me toward the document I missed or it doesn't exist and we might want to talk about weather it should exist. I expected I could write a file like ~/.ansible/galaxy-defa

  1   2   3   4   >