Re: [ansible-project] New releases: ansible-core 2.13.2

2022-07-21 Thread Nico Kadel-Garcia
On Mon, Jul 18, 2022 at 12:17 PM Matt Martz wrote: > > Hi all- we're happy to announce the general release of: > > - ansible-core 2.13.2 > > > How to get it > - > > $ python3 -m pip install --user ansible-core==2.13.2 On RHEL 8, you need to enable modularity, install python38 and pyth

Re: [ansible-project] Re: Non Config Data in Ansible NRM Module

2022-07-21 Thread Tony van der Peet
Hi I came across this email while searching for the same thing. In particular, we are considering the interface speed using a network resource module. Speed in the resource module appears to be the configured speed, which can take on the value Auto, and this is the default. What we are wonderin

Re: [ansible-project] how do i lookup id_rsa.pub on a host and copy it to authorized keys on multiple servers

2022-07-21 Thread Tony Wong
do you mean something like this? --- # tasks file for createuser - include_vars: dir: vars *- name: Get id_rsa.pub from localhost set_fact:auth_key: "{{ lookup('file', '/home/rke/.ssh/id_rsa.pub')}}" delegate_to: localhost* - name: create user rke ansible.builtin.user: name: '

Re: [ansible-project] Re: netbox_interface module: Failed to establish connection to Netbox API"

2022-07-21 Thread Abhijeet Kasurde
I would start debugging from this line - https://github.com/netbox-community/ansible_modules/blob/8ef1932f2a40d1d913429e939d8da0abcd927c9d/plugins/module_utils/netbox_utils.py#L695 replacing - ``` except Exception: self.module.fail_json(msg="Failed to establish connection to NetBox API" ) ```

Re: [ansible-project] Re: netbox_interface module: Failed to establish connection to Netbox API"

2022-07-21 Thread maulik patel
If you can scratch your head little bit then I’ll be appreciated.. I’ve wasted couple of hours for these but no luck and im out of ideas… Thank you ..!! On Thu, 21 Jul 2022 at 8:30 PM Heinz Meier wrote: > Yes. But I don't remember how > > maulik patel schrieb am Do., 21. Juli 2022, > 13:09: >

Re: [ansible-project] Re: netbox_interface module: Failed to establish connection to Netbox API"

2022-07-21 Thread Heinz Meier
Yes. But I don't remember how maulik patel schrieb am Do., 21. Juli 2022, 13:09: > did you get it resolved ? > > On Thursday, July 2, 2020 at 12:30:54 AM UTC+5:30 heinz6...@gmail.com > wrote: > >> Hi, >> >> I am quite desparate already. I want to use the netbox_interface module >> in ansible, bu

Re: [ansible-project] how do i lookup id_rsa.pub on a host and copy it to authorized keys on multiple servers

2022-07-21 Thread Dick Visser
On Thu, 21 Jul 2022 at 16:32, Tony Wong wrote: > > yes it does, but the user (ansible) i am running the playbook with even > though it has sudo rights and in root group cant access that folder. Your authorized_keys task is run on the remote host, but using the lookup/file plugin in one of the a

Re: [ansible-project] how do i lookup id_rsa.pub on a host and copy it to authorized keys on multiple servers

2022-07-21 Thread John Petro
Sounds like you have a local permissions issue. On Thu, Jul 21, 2022 at 10:32 AM Tony Wong wrote: > yes it does, but the user (ansible) i am running the playbook with even > though it has sudo rights and in root group cant access that folder. > > i tried to copy the id_rsa.pub to /tmp and it wor

Re: [ansible-project] how do i lookup id_rsa.pub on a host and copy it to authorized keys on multiple servers

2022-07-21 Thread Tony Wong
yes it does, but the user (ansible) i am running the playbook with even though it has sudo rights and in root group cant access that folder. i tried to copy the id_rsa.pub to /tmp and it works On Thu, Jul 21, 2022 at 7:10 AM John Petro wrote: > Does /home/rke/.ssh/id_pub.rsa exist on the host y

Re: [ansible-project] find element with dictionary in Ansible and return value

2022-07-21 Thread Brian Coca
First you conflate site as both a variable and a string, showing both examples below to make the distinction clear. You don't need key/keys() nor quotes if 'site' is a variable when: site in sites You seem to use site as both var and string, if site is a string, you need quotes when: "

Re: [ansible-project] how do i lookup id_rsa.pub on a host and copy it to authorized keys on multiple servers

2022-07-21 Thread John Petro
Does /home/rke/.ssh/id_pub.rsa exist on the host you are running the ansible playbook from? Also, what happens if you try to do a ls on that directory as the user that is executing the ansible playbook, are you getting any errors? On Thu, Jul 21, 2022 at 9:09 AM Tony Wong wrote: > [WARNING]: Un

Re: [ansible-project] find element with dictionary in Ansible and return value

2022-07-21 Thread Abhijeet Kasurde
The last task should be - ``` - debug: msg: "{{ sites[site] }}" when: "site in sites.keys()" On Wed, Jul 20, 2022 at 4:02 PM maulik patel wrote: > hi , > > i'm trying to value of one yaml file1 with another file2 which has list of > dict and if element if file1 matched with key/value of file2 t

Re: [ansible-project] how do i lookup id_rsa.pub on a host and copy it to authorized keys on multiple servers

2022-07-21 Thread Tony Wong
[WARNING]: Unable to find '/home/rke/.ssh/id_pub.rsa' in expected paths (use -v to see paths) fatal: [k8master]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'file'. Error was a , original message: could not locate file in lookup: /home/rke/.ssh/id_pub.rsa

Re: [ansible-project] how do i lookup id_rsa.pub on a host and copy it to authorized keys on multiple servers

2022-07-21 Thread Tony Wong
how do i access to lookup the id_rsa.pub file? The user running ansible playbook has sudo rights on the controller On Wed, Jul 20, 2022 at 4:31 PM Todd Lewis wrote: > It would have root access — on the target machine, but not on the Ansible > controller. > > On Wednesday, July 20, 2022 at 6:24:2

Re: [ansible-project] how do i lookup id_rsa.pub on a host and copy it to authorized keys on multiple servers

2022-07-21 Thread Tony Wong
main.yml --- - hosts: k8s become: true roles: - rancherpocreplay On Wed, Jul 20, 2022 at 4:35 PM David Logan wrote: > I didn't see the main.yml file and can't comment on your setup. Yes, root > should have access however I'm not sure become would carry over all tasks. > I thought it was task sp

[ansible-project] Re: netbox_interface module: Failed to establish connection to Netbox API"

2022-07-21 Thread maulik patel
did you get it resolved ? On Thursday, July 2, 2020 at 12:30:54 AM UTC+5:30 heinz6...@gmail.com wrote: > Hi, > > I am quite desparate already. I want to use the netbox_interface module in > ansible, but it fails. To check it, I use the uri module: > > - name: URI > uri:: > url: https://127