[ansible-project] Question regarding aws_sts_assumerole

2020-07-15 Thread Des Sindatry
Hello, I am using ansible to launch ec2 instances . As part of that using ADFS SAML integration. Playbook --- - name: Ansible test hosts: localhost tasks: - name: sts_assume_role: role_arn: "arn:aws:sts::925052198153:assumed-role/DBAAdmin" role_session_name:

[ansible-project] New to Ansible - install Infrastructure

2020-07-15 Thread Daniel
I am new to Ansible, my company is doing a POC to move away from our current tool. I have an eval license for Ansible Tower, however, I am also going to run dual POC's one with Tower and one with AWX. We will have the infrastructure on AWS, can I put AWX on an Amazon Linux server or does it

Re: [ansible-project] Save output to text file

2020-07-15 Thread Tcpip
Hello , I tried with this configuration - name: SAVE OUTPUT TO FILE copy: content: "{{ enviro.results[0].stdout }}" dest: "/root/playbooks/results/{{ inventory_hostname }}-space.txt" tags: save But still having the same issue fatal: [localhost]: FAILED! => {

Re: [ansible-project] Re: remove mysql

2020-07-15 Thread Stefan Hornburg (Racke)
On 7/15/20 6:55 PM, Tony Wong wrote: > this was the original install and I am just trying to reverse the installs > > What is the distribution and the release of the target server(s)? Regards Racke > --- > - hosts: all >   become: true >   vars_files: >     - vars/default.yml >

[ansible-project] Re: remove mysql

2020-07-15 Thread Dan Linder
> I tried this pb but its not uninstalling Can you be more specific? What version of Ansible are you using, what version of Debian/Ubuntu is the server you're working on? What is the output of this command when you run it on the machine you're wanting to remove the packages from: apt

[ansible-project] Ansible Registry workaround for CVE-2020-1350

2020-07-15 Thread Gerry Maddock
If needed. This worked for me. # DESCRIPTION # Registry workaround for CVE-2020-1350 - name: Registry workaround for CVE-2020-1350 hosts: dns_servers gather_facts: yes tasks: - name: Apply Reg workaround win_regedit: path: HKLM:\SYSTEM\CurrentControlSet\Services\DNS\Parameters name:

Re: [ansible-project] ansible - rhel8

2020-07-15 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Here is the whole playbook: --- - name: Install zabbix hosts: ALL_LINUX become: yes vars_files: - passwd.yml - vars.yml ignore_errors: yes vars: os_version: "{{ ansible_distribution_major_version }}" zabbix_repo: /etc/yum.repos.d/zabbix.repo zabbix_config:

[ansible-project] Re: Integrating Microsoft LAPS and ansible

2020-07-15 Thread Jordan Borean
I don’t understand what you mean sorry. OpenLDAP is required on the controller because that’s a dependency of python-ldap that the lookup uses https://www.python-ldap.org/en/python-ldap-3.3.0/installing.html#installing. If you already have it installed then you don’t need to reinstall it. If

Re: [ansible-project] ansible - rhel8

2020-07-15 Thread vinoth kumar
Where is your actual tasks starts ? Tasks is missing On Wed 15. Jul 2020 at 20:17, 'Chris Bidwell - NOAA Federal' via Ansible Project wrote: > Hey all, > > having an interesting issue with my latest rhel8 installation. > > Trying to install an rpm from a URL. Here's my playbook: > > --- > -

[ansible-project] ansible - rhel8

2020-07-15 Thread 'Chris Bidwell - NOAA Federal' via Ansible Project
Hey all, having an interesting issue with my latest rhel8 installation. Trying to install an rpm from a URL. Here's my playbook: --- - name: Install zabbix hosts: ALL_LINUX become: yes vars_files: - passwd.yml - vars.yml ignore_errors: yes vars: os_version: "{{

[ansible-project] Re: remove mysql

2020-07-15 Thread Tony Wong
I tried this pb but its not uninstalling -- - hosts: all become: true vars_files: - vars/default.yml tasks: - name: remove apt: name: - mysql-server - mysql-client - python3-pymysql - php - php-mysql - libapache2-mod-php

[ansible-project] Re: remove mysql

2020-07-15 Thread Tony Wong
> > this was the original install and I am just trying to reverse the installs > --- - hosts: all become: true vars_files: - vars/default.yml tasks: - name: Install prerequisites apt: name={{ item }} update_cache=yes state=absent force_apt_get=yes loop: [ 'aptitude' ]

Re: [ansible-project] remove mysql

2020-07-15 Thread Stefan Hornburg (Racke)
On 7/15/20 5:38 PM, Tony Wong wrote: > trying to remove mysql from a previous install > > -- > - hosts: all >   become: true >   vars_files: >     - vars/default.yml > >   tasks: >   - name: Uninstall MySQL packages. >     apt: name={{ item }} state=absent >     with_items: >       -

Re: [ansible-project] How to retrieve arguments to ansible-playbook from ansible?

2020-07-15 Thread Dick Visser
Yes, that goes a long way. But I realized we call ansible-playbook from a shell wrapper, so I used "${@}" in there instead. thx! On Wed, 15 Jul 2020 at 17:28, Nuno Jordão wrote: > > Hello, > > Is this what you are looking for? > >

[ansible-project] Re: how to determine group's id?

2020-07-15 Thread Laci
Thank you, this did it: - name: set fact for group set_fact: group_id: "{{ getent_group.monitor[1] }}" - name: Add proc to fstab and mount it mount: path: /proc src: proc fstype: proc opts: "defaults,hidepid=2,gid={{ group_id }}" dump:

[ansible-project] remove mysql

2020-07-15 Thread Tony Wong
trying to remove mysql from a previous install -- - hosts: all become: true vars_files: - vars/default.yml tasks: - name: Uninstall MySQL packages. apt: name={{ item }} state=absent with_items: - mysql-server - mysql-client but not working [Uninstall MySQL

Re: [ansible-project] How to retrieve arguments to ansible-playbook from ansible?

2020-07-15 Thread Nuno Jordão
Hello, Is this what you are looking for? https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html Nuno Jordão On Wed, Jul 15, 2020 at 3:04 PM Dick Visser wrote: > Hi > > As part of our deployment we are saving a file > /etc/deployment_status.json onto remote

Re: [ansible-project] how to determine group's id?

2020-07-15 Thread Vladimir Botka
On Wed, 15 Jul 2020 06:34:10 -0700 (PDT) Laci wrote: > - getent: > database: group > - debug: > var: getent_group.monitor > > - name: add line to fstab > lineinfile: > path: /etc/fstab > line: proc/procprocdefaults,hidepid=2,gid={{ var }} > 0

Re: [ansible-project] how to determine group's id?

2020-07-15 Thread Vladimir Botka
On Wed, 15 Jul 2020 06:34:10 -0700 (PDT) Laci wrote: > - name: add line to fstab > lineinfile: > path: /etc/fstab > line: proc/procprocdefaults,hidepid=2,gid={{ var }} Use "mount". It will create the entry in fstab

[ansible-project] How to retrieve arguments to ansible-playbook from ansible?

2020-07-15 Thread Dick Visser
Hi As part of our deployment we are saving a file /etc/deployment_status.json onto remote nodes: vars: deployment_status: version: "{{ our_version }}" date: "{{ ansible_date_time.iso8601 }}" deployer: "{{ lookup('env', 'USER') }}" ansible: "{{ lookup('pipe',

Re: [ansible-project] how to determine group's id?

2020-07-15 Thread Laci
Thank you guys, this fixes the first part. But how do I reuse the output of getent, I tried, the following but didn't work - getent: database: group - debug: var: getent_group.monitor - name: add line to fstab lineinfile: path: /etc/fstab line: proc/proc

[ansible-project] Re: Integrating Microsoft LAPS and ansible

2020-07-15 Thread harsh chawda
Hello, I have one doubt like not all systems in my environment are configured with LAPS as of now. So some of the systems are having LAPS others are having LDAP . So will both the things work out. ie. basically if i install OpenLDAP , is it standalone package/module or will it replace the

Re: [ansible-project] Re: Ansible with Z Open Automation Utilities on z/OS

2020-07-15 Thread Władysław Borysow
Thanks! Will try it:-) wt., 14.07.2020, 20:01 użytkownik Dakota Heyman napisał: > I have done all of my ansible z/OS stuff by using z/OSMF APIs but your > syntax looks right from an ansible perspective to me. For ZOA Utilities and > Ansible zOS Module errors, I would recommend posting a bug

[ansible-project] Re: Integrating Microsoft LAPS and ansible

2020-07-15 Thread harsh chawda
Hello , Thanks for you reply. I will test it out the same. Thanks again. On Tuesday, July 14, 2020 at 1:12:56 AM UTC+5:30, jbor...@gmail.com wrote: > > Theres the laps_password > https://docs.ansible.com/ansible/latest/plugins/lookup/laps_password.html > lookup that you can use to retrieve a

Re: [ansible-project] Re: Need to add A record and PRT recored in Cisco switches

2020-07-15 Thread Srinivas Naram
Hello Can you elaborate your issue and explain the steps taken so far. On Wed, Jul 15, 2020 at 2:21 PM Balayuvaraj Magudapathi < bala08yuva...@gmail.com> wrote: > Hi, > > Can any help on this > > > > On Monday, 13 July 2020 16:48:40 UTC+5:30, Balayuvaraj Magudapathi wrote: >> >> Hey, >> >> In

Re: [ansible-project] python unable to install open_excel module for ansible

2020-07-15 Thread Udayendu kar
You can use: $ sudo pip3 install openpyxl -y I am using this and its working perfectly. On Wednesday, July 15, 2020 at 3:26:50 PM UTC+5:30 dick@geant.org wrote: > Your best bet is to ask the author of that code: > https://pypi.org/user/mohamedosam/ > > On Wed, 15 Jul 2020 at 04:46,

Re: [ansible-project] python unable to install open_excel module for ansible

2020-07-15 Thread Dick Visser
Your best bet is to ask the author of that code: https://pypi.org/user/mohamedosam/ On Wed, 15 Jul 2020 at 04:46, stack flow wrote: > > Hello, > > I need open_excel module for ansible so that it can read multiple sheets in > excel. I am getting following errors. how to fix it? I am using

Re: [ansible-project] 'win_partition' is unable to resize the hdd

2020-07-15 Thread Udayendu kar
Finally able to connect to the windows guest after doing some setting change in the WinRM inside the guest but 'win_partition' is creating a new partition instead of extending one: # cat ../inventory [windows] xxx.xxx.xxx.xxx [windows:vars] ansible_connection=winrm ansible_user=Administrator

[ansible-project] Re: Need to add A record and PRT recored in Cisco switches

2020-07-15 Thread Balayuvaraj Magudapathi
Hi, Can any help on this On Monday, 13 July 2020 16:48:40 UTC+5:30, Balayuvaraj Magudapathi wrote: > > Hey, > > In my environment i need to add a record and prt record in cisco switches > for 800 devices. > > Some share the docs for this project > > component Name : network module , cisco > >

Re: [ansible-project] ansible check and diff mode not working

2020-07-15 Thread Shyam Sunder
I am sure if that is true. Because I could reproduce this for other network modules also like (exos_config, eos_config). In the first tutorial ( https://blog.networktocode.com/post/generating-diff-with-ansible/) I posted, its mentioned that these module support diff & check mode. But no sample

Re: [ansible-project] ansible check and diff mode not working

2020-07-15 Thread Stefan Hornburg (Racke)
On 7/15/20 10:08 AM, Shyam Sunder wrote: > Thanks for reply. Yes below is my intended config - > | > ntp server 10.19.70.1 > | > > But on device we have different ntp server configured - > | > ntp server 10.19.60.9 > | > * > Here in updates section, ansible guiding me that its going to push this

Re: [ansible-project] 'win_partition' is unable to resize the hdd

2020-07-15 Thread CORLEONE##
u001b[91munexpected token '\u', expected 'begin', 'process', 'end', or\n\u001b[96m | \u001b[91m'dynamicparam'.\n\u001b[0m\n", "module_stdout": "", "msg": "MODULE Answer is unexpected tokens On Wed, 15 Jul 2020, 11:04 Udayendu kar, wrote: > Disk resize code: > > ``` > - name: Extend the C

Re: [ansible-project] ansible check and diff mode not working

2020-07-15 Thread Shyam Sunder
Thanks for reply. Yes below is my intended config - ntp server 10.19.70.1 But on device we have different ntp server configured - ntp server 10.19.60.9 *Here in updates section, ansible guiding me that its going to push this NTP config. But what config already exits is not mentioned or

[ansible-project] 'win_partition' is unable to resize the hdd

2020-07-15 Thread Jordan Borean
So you are running a PowerShell module on localhost which won’t work. How have you defined your inventory, how are you targeting that host in your play? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop

Re: [ansible-project] ansible check and diff mode not working

2020-07-15 Thread Srinivas Naram
Hello Shyam It is how the output is displayed. In your output updates are showing the difference in running config and your cfg file. "updates": [ "configure ntp server add x.x.x.x" ], I don't see any issue with the output. Did you try changing the ntp setting on the device