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
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
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
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
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
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
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
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
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
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
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]
**
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
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
13 matches
Mail list logo