Re: [ansible-project] Trying to Change Splunk Password via Splunk Syntax - Erroring

2018-01-17 Thread Mike Eriksson
Heather, I run a similar thing in my environment and it works quite ok. What I do is as follows: <- Cut -> - name: Set the new Splunk admin password action: shell /opt/splunkforwarder/bin/splunk edit user admin -auth admin:changeme -role admin -password {{splunk_new_pass}} <- Cut ->

[ansible-project] Ansible 2.4.3.0 rc2 ready for testing

2018-01-17 Thread Toshio Kuratomi
Hi all, we're happy to announce that RC2 for 2.4.3.0 is now available for testing. How do you get it? -- The tar.gz of the release can be found here: https://releases.ansible.com/ansible/ansible-2.4.3.0-0.5.rc2.tar.gz SHA256:

[ansible-project] Re: Trying to Change Splunk Password via Splunk Syntax - Erroring

2018-01-17 Thread Jordan Borean
The win_shell module is used to run shell command, in the case of powershell they could be New-Item, Get-Item, .. or for cmd it would be things like dir, pwd and so on. You can technically run executables like splunk through win_shell by prefixing it with the call operator (powershell-ism) but

[ansible-project] Trying to Change Splunk Password via Splunk Syntax - Erroring

2018-01-17 Thread Heather Luna
Hello! My first playbook is just about complete. I just have a couple config changes to make with some .conf files and a password edit for the splunk user. Splunk documentation states to run this command at the command line to change the Splunk admin password: Run the following command

Re: [ansible-project] Re: how to best accomodate different default values for variables in a role. eg list of ports to open may change when a new version of the software (= role ) is installed

2018-01-17 Thread Chris7444
It looks good, thank you On Wednesday, January 17, 2018 at 1:45:38 PM UTC+1, Vladimir Botka wrote: > > Hi Chris, > > On Wed, 17 Jan 2018 04:12:13 -0800 (PST) > Chris7444 wrote: > > Well, this is not what I want. I dont want to modify the tasks everytime > > the list

[ansible-project] Re: Perform a failed_when: on an async task based on a value from stdout

2018-01-17 Thread Daniel Heffner
it's been a while since you posted, but maybe this will help someone else. I have a similar issue - it looks like failed_when just doesn't work with async tasks. I've had to ignore errors on the async task and use ansible's fail module with a when condition as the next task to fail the play On

Re: [ansible-project] json_query on getent_group-data: resolving the group-name for a given group-id

2018-01-17 Thread Matt Martz
I'm not a huge fan of json_query for most cases. I think using the native jinja2 filters are often more readable, although in this case, not 100% more readable. ``` getent_group|dictsort|selectattr('1.1', 'equalto', '100')|first|first ``` That turns `getent_group` into a list of tuples, selects

[ansible-project] json_query on getent_group-data: resolving the group-name for a given group-id

2018-01-17 Thread Henning Rohde
Hello! Is there an elegant way to deduce from given gid to group-name in the dictionary that's provided by the getent-module of ansible? --- - hosts: localhost pre_tasks: - local_action: module: getent database: group vars: - group_name: 'users' - group_id: "{{

[ansible-project] vsphere_guest module doesn't receve datastore value

2018-01-17 Thread Arkanon
Hello. I want to deploy a VMWare Linux VM from a template and then customize IP and hostname. With vmware_guest module the deploy where finished, but I couldn't set IP/hostname. So I changed to vsphere_guest module to give a try. However, with vsphere module the deploy process doesn't even

Re: [ansible-project] Re: Ansible Copy module error - "Exec format error"

2018-01-17 Thread Larry Bakun
Can you please share your solution? I'm facing the same issue. On Thursday, June 22, 2017 at 3:11:13 PM UTC-4, Anfield wrote: > > Ok. Thanks. Once I update the stuff.fact file then the playbook runs fine. > > >> -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] how to search inside variables or debug ?

2018-01-17 Thread F
Perfect!! Thanks for the quick help On Wednesday, January 17, 2018 at 5:12:18 PM UTC, Kai Stian Olstad wrote: > > On Wednesday, 17 January 2018 18.04.22 CET F wrote: > > Ref: http://blog.toast38coza.me/custom-ansible-module-hello-world/ > > > > play.yml > > > > - hosts: test tasks: > >

Re: [ansible-project] how to search inside variables or debug ?

2018-01-17 Thread Kai Stian Olstad
On Wednesday, 17 January 2018 18.04.22 CET F wrote: > Ref: http://blog.toast38coza.me/custom-ansible-module-hello-world/ > > play.yml > > - hosts: test tasks: > - name: Test that my module works > logmonitor_v1: > register: result > > - debug: var=result > > - name:

Re: [ansible-project] How to enhance the --check mode

2018-01-17 Thread Jörg Kastning
Am 17.01.2018 4:20 nachm. schrieb "Kai Stian Olstad" < ansible-project+l...@olstad.com>: $ ansible-playbook --help | grep diff -D, --diffwhen changing (small) files and templates, show the differences in those files; works great with --check Wow. Obviously

[ansible-project] how to search inside variables or debug ?

2018-01-17 Thread F
Ref: http://blog.toast38coza.me/custom-ansible-module-hello-world/ play.yml - hosts: test tasks: - name: Test that my module works logmonitor_v1: register: result - debug: var=result - name: Checking if there is any Error in log files fail: msg="{{

[ansible-project] Re: Ansible copy multiple files to multiple destinations ??

2018-01-17 Thread Love
Hi Soniya, Cool, I will implement this one and let you know. Thank you very much!! On Wednesday, December 20, 2017 at 3:15:53 AM UTC-8, Soniya panwar wrote: > > Hello Love, > > You cannot implement this scenario using Notify-Handler. You will have to > use the WHEN condition (Implementation

[ansible-project] ansible facts on hardened servers etc 0711

2018-01-17 Thread Robert V
In a shared-hosting environment it is important to give out as little info as possible to the users. For this purpose, permissions on most folders under / = 0711 . With /etc 0755, I can pull ansible facts, however with 0711 I get 'NA'. Under root user there is no issue, but configuration of

Re: [ansible-project] How to enhance the --check mode

2018-01-17 Thread Kai Stian Olstad
On Wednesday, 17 January 2018 15.06.48 CET Jörg Kastning wrote: > Hello all, > > we use ansible playbooks to deploy an ininital config for e.g. postfix, > chrony and sshd_config to new hosts. After the deployment these systems are > under the control of the associated SysAdmin. We would like to

[ansible-project] ansible playbook - tasks in block are ignored and aren't executing

2018-01-17 Thread chipcha
Hi all, I was hoping if you can help me with an issue I encountered while running my playbook. The playbook worked successfully until I rebased my code and now it appears to stop running tasks from a specific block (see [1]). It appears to be related to a change which was introduced in

[ansible-project] How to enhance the --check mode

2018-01-17 Thread Jörg Kastning
Hello all, we use ansible playbooks to deploy an ininital config for e.g. postfix, chrony and sshd_config to new hosts. After the deployment these systems are under the control of the associated SysAdmin. We would like to use ansible to audit the nodes to check if the intitial config was

Re: [ansible-project] Re: how to best accomodate different default values for variables in a role. eg list of ports to open may change when a new version of the software (= role ) is installed

2018-01-17 Thread Vladimir Botka
Hi Chris, On Wed, 17 Jan 2018 04:12:13 -0800 (PST) Chris7444 wrote: > Well, this is not what I want. I dont want to modify the tasks everytime > the list of ports changes. I guess the answer is by using some include > statement (which will include a file containing

[ansible-project] Re: how to best accomodate different default values for variables in a role. eg list of ports to open may change when a new version of the software (= role ) is installed

2018-01-17 Thread Chris7444
Well, this is not what I want. I dont want to modify the tasks everytime the list of ports changes. I guess the answer is by using some include statement (which will include a file containing the version specific list of ports). I am just wondering where this include file should be included.

[ansible-project] Ansible - authorized_key - failed to lookup user

2018-01-17 Thread Ondrej Uksa
How can I solve problem with run ansible role below? If a user doesn't exist on the remote server, ansible gets me the error "*Failed to lookup user test1: 'getpwnam(): name not found: test1*". I want to run it on multiple servers and if a user doesn't exist do nothing on a server and skip

[ansible-project] FAILED - RETRYING: does not stop

2018-01-17 Thread Евгений В
In my script, the startup command of the server is started, and then it is checked whether the server has started. In fact the server started, but the ansible does not see this, the countdown of "FAILED - RETRYING" continues until the end. What could be the problem? Version: ansible 2.3.2.0 -

[ansible-project] Re: how to best accomodate different default values for variables in a role. eg list of ports to open may change when a new version of the software (= role ) is installed

2018-01-17 Thread Martyn Kempster
I'm not much of an expert but I have done similar things based on OS version which can be done by having a task for each version then using 'when' conditionals and using the ansible OS version fact. In a similar way if you could assign the version number to a variable you could base it off that

[ansible-project] how to best accomodate different default values for variables in a role. eg list of ports to open may change when a new version of the software (= role ) is installed

2018-01-17 Thread Chris7444
Sorry of the subject is not very descriptive. Let me be more explicit here I have a role that installs a piece of software at version N. this role by default open ports number x and y in the firewall. This list of ports is defined in /default/main.yml Now I want to install version N+1 of the