Re: [ansible-project] List manipulation questions

2021-09-27 Thread Sandip Bhattacharya
Hi, It would be helpful to us if you could explain a bit more clearly about: a. What you want to do here b. What are all the inputs here Questions: - What are the variables 'my_host' and 'server' here? - Do you want a file created on every host? Or only on the control-host? In any case, using

[ansible-project] List manipulation questions

2021-09-27 Thread Alex Wanderley
Hello, I understand this very basic, but I'm still learning... (And my apologies for the long message.) I built the playbook below so I can check which server is still in need of an OS update based on its current kernel version: --- - hosts: "{{ my_host }}" remote_user: xx

[ansible-project] New release beta: ansible-core 2.12.0b1

2021-09-27 Thread Matt Martz
Hi all- we're happy to announce the beta release of: - ansible-core 2.12.0b1 How to get it - $ pip install ansible-core==2.12.0b1 --user The tar.gz of the release can be found here: * ansible-core 2.12.0b1 https://pypi.python.org/packages/source/a/ansible-core/ansible-core-2.12.0

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread Dick Visser
The information you are looking for is already available when the fact gathering is done. No need for kludgy shell pipes/source/tee/etc. Also there is a dedicated module for what you want. Just 3 lines should be enough: - ansible.builtin.apt_repository: repo: "[arch=amd64] http://ubuntu.openv

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread 'Neil Young' via Ansible Project
Hmm. Was posting the solution already, but it doesn't appear here... OK, @Sandip solved it: - name: Install Kurento Media Server - Get Ubuntu version definitions and add repository to apt ansible.builtin.shell: | source /etc/lsb-release tee "/etc/apt/sources.list.d/kurento.list" >/dev/null

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread Dick Visser
On Mon, 27 Sept 2021 at 19:04, 'Neil Young' via Ansible Project wrote: > - name: Get Ubuntu version definitions > ansible.builtin.shell: source /etc/lsb-release What is the purpose of this task? I.e. What are you trying to achieve? -- Dick Visser Trust & Identity Service Operations Manager

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread Sandip Bhattacharya
This won't work for you? $ sudo bash -c 'source /etc/lsb-release; echo $DISTRIB_CODENAME' focal On 27.09.21 19:14, 'Neil Young' via Ansible Project wrote: Exactly. which source gives nothing. If I run the command at non-elevated level I get useful results and the environment is filled sou

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread 'Neil Young' via Ansible Project
Exactly. which source gives nothing. If I run the command at non-elevated level I get useful results and the environment is filled source /etc/lsb-release echo $DISTRIB_CODENAME bionic sudo source /etc/lsb-release [sudo] password for ubuntu: sudo: source: command not found So it is a mat

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread Sandip Bhattacharya
source is a bash built-in command. There is no executable. You can try "bash -c 'source /etc/lsb-release' " HTH,   Sandip On 27.09.21 19:04, 'Neil Young' via Ansible Project wrote: Hi, I'm banging my head trying to make this simple statement work: - name: Get Ubuntu version definitions   a

Re: [ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread harry devine
You should use the full path to the source executable. "which source" should give you that. Harry On Mon, Sep 27, 2021, 1:04 PM 'Neil Young' via Ansible Project < ansible-project@googlegroups.com> wrote: > Hi, > > I'm banging my head trying to make this simple statement work: > > - name: Get Ubu

[ansible-project] Cannot source /etc/lsb-release

2021-09-27 Thread 'Neil Young' via Ansible Project
Hi, I'm banging my head trying to make this simple statement work: - name: Get Ubuntu version definitions ansible.builtin.shell: source /etc/lsb-release But whatever I do I get this: TASK [Get Ubuntu version definitions] **

[ansible-project] if/what ansible_network_os support Oracle/Acme packet/Ribbon Sonus session border controller

2021-09-27 Thread Hau Wu
Hi We use ansible to do automation on a variety of devices. Currently we are able to use ansible to do linux servers, VMware, Cisco switch/router/firewall. However when I tried use ansible to test ssh on Oracle/Acme Packet session border controller, it give error ""msg": "network os oracle is

Re: [ansible-project] Re: How to backup Cisco devices ?

2021-09-27 Thread Nilashish Chakraborty
Hello Ibrahim, You can use the respective config modules to take a full backup of running-config. Please refer to the examples and documentation for these module: 1. https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_config_module.html 2. https://docs.ansible.com/ansi