Re: [ansible-project] Unable to run command on windows. Please explain!

2020-05-29 Thread Ompragash
You cannot use python modules(i.e. command) against windows server. Try with win_command module. Also, you need to modify your entire playbook as it's incorrect. Both "ignore_unreachable" and "gather_facts" are playbook keywords and you cannot pass them as variables check[0]. You've also passed

[ansible-project] Unable to run command on windows. Please explain!

2020-05-29 Thread Work-Hard
Hi, I am unable to run command and throws an error. What am I doing wrong? Please explain! Thanks "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "module_stderr": "Exception calling \"Create\" with \"1\" argument(s): \"At line:4

Re: [ansible-project] reuse of paramter value inside configuration file

2020-05-29 Thread Vladimir Botka
On Fri, 29 May 2020 13:20:22 -0700 (PDT) דודו דודו wrote: > user_details: > - {username: user3, > uid: 2001, > user_domain_password: 1234@WSX, > keytab_name: {{ username }}.keytab } Referencing a key in a dictionary doesn't work.

[ansible-project] reuse of paramter value inside configuration file

2020-05-29 Thread דודו דודו
Hi, I’m running a playbook that create a user on remote server and also, generate keytab file for that user based on domain properties. I have a configuration file that holds the username , uid and some other information. 1. I wish that that keytab file will be par of the

[ansible-project] Executing a role dependency on all hosts in a list before executing main role

2020-05-29 Thread Brent Kingston
I'm relatively new to Ansible and I have a question about role dependencies. Is it possible to have a dependency execute on all hosts in a hostList before proceeding to perform the tasks of the given role Just a sudo code example ___ name: role1 name: role2 dependency: role1 ___ The reason

Re: [ansible-project] Re: Parsing results

2020-05-29 Thread Andrew Morgan
That you very much this code below worked. - name: setting fact for subnet ID set_fact: SUBNETID="{{ item.subnet_id }}" with_items: "{{ ec2_facts.instances[0].network_interfaces }}" - name: setting fact for Security group set_fact: SERCURITYGROUP="{{ item.group_name }}"

[ansible-project] how to use ansible tags with conditional includes?

2020-05-29 Thread misterT1958
Hey folks, I have run into a problem that I have not been able to solve -- I hope somebody out there has had better luck than I have. Here's the setup: At the top level directory there is an executive shell script that calls a playbook, the particular playbook called is based on inputs to the

Re: [ansible-project] Restricting Commands after privilege escalation using sudo in ansible.

2020-05-29 Thread Dick Visser
No: https://docs.ansible.com/ansible/latest/user_guide/become.html#privilege-escalation-must-be-general On Fri, 29 May 2020 at 12:33, varun mohan wrote: > > Hi, > Currently ansible uses wrapper scripts(shell/python) for executing commands > as privileged user suing sudo. Due to this its

[ansible-project] Restricting Commands after privilege escalation using sudo in ansible.

2020-05-29 Thread varun mohan
Hi, Currently ansible uses wrapper scripts(shell/python) for executing commands as privileged user suing sudo. Due to this its currently not possible to restrict what commands ansible fires on the remote machine after privilege escalation. Main reason being ansible required NO PASSWD:ALL or NO

[ansible-project] Question: how to Use name of shell script as value to variable and execute it

2020-05-29 Thread Adam Memon
Hi All, I have a requirement to login to multiple application servers and just run different scripts individually on different servers Rather than creating task for each server - I would like to just create one task with name of the shell script in a variable How can we implement this Eg :

Re: [ansible-project] Issue with lineinfile module #69739

2020-05-29 Thread Vladimir Botka
On Thu, 28 May 2020 22:14:35 -0700 (PDT) Amith sha wrote: > Tried to write a line using lineinfule module sequentially were observed > that the random lines are missed to write on the file. > > serial: 100 > > - name: Write Disks Data to file > lineinfile: ... > delegate_to: