[ansible-project] Re: Parameterize an array for vars_files, can't seem to template i.e. lookup/split

2018-09-11 Thread H Kim
I see in manager.py that the template is applied only individually per vars_files item and not at the top level so it's not possible to assign a list structure directly to *vars_files.* https://github.com/maxamillion/ansible/blob/stable-2.6/lib/ansible/vars/manager.py Any other alternatives to

[ansible-project] Re: ansible winrm : the specified credentials were rejected by the server

2018-09-11 Thread Karoly VEGH
On Tuesday, September 11, 2018 at 10:05:51 PM UTC+2, Jordan Borean wrote: > > I can't stress this enough, do not set AllowUnencrypted="true" on your > Windows hosts. This may have been needed a few years ago but today you can > easily set up a HTTPS listener with a self signed certificate or

[ansible-project] Re: Conditional when based on grep results

2018-09-11 Thread Edward
Chris, Try string_not_exist.rc > 0 or string_not_exist.rc == 1. Grep will not return to stdout if the string does not exist in the log file—the command will return (rc = return code) an exit code of 1. For example: echo "test test test" | grep string echo $? 1 Hope this helps. On Tuesday,

[ansible-project] Conditional when based on grep results

2018-09-11 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, So I'm trying to do a check to see if a string exists in a file and to add if it does not. This is what I have: - name: exists in file command: "grep string /var/log/file" register: string_not_exist - name: run_if_exists command: "touch /tmp/add" when: string_not_exist.stdout

[ansible-project] Parameterize an array for vars_files, can't seem to template i.e. lookup/split

2018-09-11 Thread H Kim
*I'd like to read in a directory full of var files without having to specify individual files.* *The below combination of lookup and split is valid to define a variable but appears not to be supported with vars_files with **"ERROR! vars file { was not found on the Ansible Controller."*

[ansible-project] Lost in group_vars, append

2018-09-11 Thread Arturas R.
Hello Community, I could really use some help here. First of all, I would like to say, that I am with ansible for couple of days, so sorry in advance :) My use case: I am setting up ssh configuration for all hosts. I want to have default AcceptEnv for CentOS, but I have one hosts group which

Re: [ansible-project] Strange failure when trying to delegate_to using a group member

2018-09-11 Thread Willard Dennis
Advice taken, replaced hypens in group names with underscores, everything works now (after I also fixed the "$item" in the delegate_to to be the correct "{{ item }}" syntax) Thanks for the quick help! On Tuesday, September 11, 2018 at 4:21:00 PM UTC-4, Matt Martz wrote: > > The problem is

[ansible-project] Re: ansible winrm : the specified credentials were rejected by the server

2018-09-11 Thread Jordan Borean
I can't stress this enough, do not set AllowUnencrypted="true" on your Windows hosts. This may have been needed a few years ago but today you can easily set up a HTTPS listener with a self signed certificate or use message encryption with NTLM, Kerberos or CredSSP authentication. If you do set

[ansible-project] Strange failure when trying to delegate_to using a group member

2018-09-11 Thread Willard Dennis
I am trying to use a delegate_to in a play where the delegated-to host is the (only) member of a group, where the groupname is 'slurm-prictlr'. The play looks like: - name: Ensure MUNGE key from Slurm primary controller is on this client synchronize: src: /etc/munge/munge.key dest:

Re: [ansible-project] Create IIS website with https binding only

2018-09-11 Thread Andriy Bilous'ko
Totally forgot about DSC (and win_dsc). Thanks a lot, Jordan понедельник, 10 сентября 2018 г., 22:31:46 UTC+3 пользователь Jordan Borean написал: > > Looks like the ssl parameter is a no-op, it is defined but never used >

Re: [ansible-project] Ansible best practice - multiple administrators

2018-09-11 Thread Dick Visser
On 11 September 2018 at 11:00, Jakub Kavka wrote: > Hello, > > i would like to ask, what is best practice to handle more Ansible > administrators from security perspective. > We would like to login with SSH keys to both control machine and remotes. > > Is the best way to do this: > > 1. Create

Re: [ansible-project] Ansible best practice - multiple administrators

2018-09-11 Thread Jonathan Lozada De La Matta
I prefer option 2 because everyone has their own keys, accounts and sudo permissions. You should use passwords with the ssh keys to avoid others from using others users keys. On Tue, Sep 11, 2018 at 5:00 AM Jakub Kavka wrote: > Hello, > > i would like to ask, what is best practice to handle

[ansible-project] Inventory script for Tilaa Cloud

2018-09-11 Thread Mark Janssen
Hi, I've written (with a collegue) an inventory-script for the Tilaa cloud. Patches and improvements are welcome, but in the basis it should work at this time. AWX here uses it successfully. Code: https://github.com/sigio/ansible-inventory-tilaa -- Mark Janssen -- m...@sig-io.nl Unix /

[ansible-project] Re: ansible winrm : the specified credentials were rejected by the server

2018-09-11 Thread Karoly VEGH
On Tuesday, February 14, 2017 at 7:20:28 PM UTC+1, Hmdi Bz wrote: winrm set winrm/config/service/auth '@{Basic="true"}' > winrm set winrm/config/service '@{AllowUnencrypted="true"}' > I can't thank you enough for the AllowUnencrypted="true" part. This was the last drop to enable my config

[ansible-project] Newbie: Am I using add_host correctly because I don't get the result I'm expecting

2018-09-11 Thread 'Maria MacCallum' via Ansible Project
I've tried pre-defining an empty group and not defining, neither seems to work, the group seems to remain empty when I try to use it, I'm sure I'm missing something vital out. This is an extract: - hosts: all-t4 # need serial 1 to be able t use add_host more than once serial: 1

[ansible-project] Ansible best practice - multiple administrators

2018-09-11 Thread Jakub Kavka
Hello, i would like to ask, what is best practice to handle more Ansible administrators from security perspective. We would like to login with SSH keys to both control machine and remotes. Is the best way to do this: 1. Create every administrator his own account at control machine and then

[ansible-project] Add key to a List of dicts depending of a simple Array - Ansible Facts (package_facts)

2018-09-11 Thread lucas . dagostino
Hello everybody, I'm currently working on generating report for each inventory host thanks to ansible-cmdb . This tool is great but I have a problem to modify some facts: I use the *package_facts

Re: [ansible-project] range operator is appending a text

2018-09-11 Thread Kai Stian Olstad
On 11.09.2018 08:39, Abhijit Chakraborty wrote: I am trying to uninstall a application using ansible. This is my playbook --- - hosts: all tasks: - name: check-packages shell: rpm -qa | grep -e "^\(HPOpr\|HPE\|HPOv\|HPBsm\|MIB2Policy\|HPOMi\)" register: output - name:

[ansible-project] range operator is appending a text

2018-09-11 Thread Abhijit Chakraborty
I am trying to uninstall a application using ansible. This is my playbook --- - hosts: all tasks: - name: check-packages shell: rpm -qa | grep -e "^\(HPOpr\|HPE\|HPOv\|HPBsm\|MIB2Policy\|HPOMi\)" register: output - name: uninstall shell: rpm -e {{