N
N
Nikolai Savelyev2017-07-31 08:37:15
css
Nikolai Savelyev, 2017-07-31 08:37:15

How to separate x32 and x64 OS in playbook?

There is a program distributed in packages, without a repository.
Now installed from the playbook like this:

- name: Install package
  command: dpkg -i /mnt/setup/64/{{item}}
  with_items:
    - programm_common_amd64.deb
    - programm-server_amd64.deb
    - programm-client_amd64.deb

But the network is not limited to 64-bit systems. Accordingly, you have to change the names and paths of the packages.
Is it possible to somehow automate the determination of the OS bit depth and the execution of the corresponding part of the playbook?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Fedorov, 2019-03-02
@DanilaBodrov

You can expand it like this, I hope the tabs themselves do not cause you any difficulties...
https://codepen.io/aliencash/pen/PLNbPp?editors=1100

A
Alexey Cheremisin, 2017-07-31
@nikweter

So just look at the variables from the output ansible myhost -m setup. Somewhere there is the version of the system and the bit depth and the version of the distribution kit and a bunch of everything.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question