Running Ansible within Salt
How to smoothly migrate away from Ansible to Salt
Pablo Suárez Hernández SUSE Senior Software Engineer psuarezhernandez@suse.com Don Vosburg SUSE Technology Specialist dvosburg@suse.com
Running Ansible within Salt How to smoothly migrate away from - - PowerPoint PPT Presentation
Running Ansible within Salt How to smoothly migrate away from Ansible to Salt Pablo Surez Hernndez Don Vosburg SUSE Senior Software Engineer SUSE Technology Specialist psuarezhernandez@suse.com dvosburg@suse.com People are using Ansible
Pablo Suárez Hernández SUSE Senior Software Engineer psuarezhernandez@suse.com Don Vosburg SUSE Technology Specialist dvosburg@suse.com
2
3
4
5
6
7
No way of a smooth, step-by-step, planned migration. Only the hard
8
9
we could just simply consider the whole Ansible as a subset of the functionality that Salt provides ?
10
11
[1] - https://build.opensuse.org/package/show/systemsmanagement:saltstack:products:next/salt
12
13
n a g e y
r A n s i b l e f r
S a l t
x e c u t e S a l t c
n d s
y
r A n s i b l e ma n a g e d s y s t e ms ( s a l t
s t e r & s a l t
s h )
14
# Some examples: # Ansible needs to be installed on the running system. $ salt-call --local ansible.list $ salt-call --local ansible.help system.ping $ salt-call --local ansible.system.ping data=”Hello from Salt”
15
# Some examples: # Ansible needs to be installed on “ansiblenode” minion. # Playbooks are already stored on the “ansiblenode” minion.
$ salt “ansiblenode” ansible.system.ping $ salt “ansiblenode” ansible.packaging.os.zypper name=”iotop” state=”installed”
$ salt “ansiblenode” ansible.playbook playbook=/srv/playbooks/install_nginx.yml
16
n a g e y
r A n s i b l e f r
S a l t
n a b l e s r e a l
i me mo n i t
i n g a n d e v e n t
r i v e n
c h e s t r a t i
.
d d t h e wh
e mi n i
f u n c t i
a l i t y t
h e A n s i b l e ma n a g e d s y s t e ms .
17
# Example of running Salt commands # on Ansible managed systems. $ salt-ssh --roster=ansible --roster-file=/etc/ansible/hosts
$ salt-ssh --roster=ansible --roster-file=/etc/ansible/hosts
susecon-fluorine-minion1.tf.local Susecon-fluorine-minion2.tf.local [webservers] susecon-fluorine-minion1.tf.local [py3-hosts] susecon-fluorine-minion1.tf.local susecon-fluorine-minion2.tf.local [py3-hosts:vars] ansible_python_interpreter=/usr/bin/python3
/etc/ansible/hosts
18
19
n s i b l e mo d u l e s
l a y b
s
20
21
n s i b l e mo d u l e s
l a y b
s
x e c u t e S a l t c
n d s ( s a l t
s h )
A n s i b l e ma n a g e d s y s t e ms
22
23
n s i b l e mo d u l e s
l a y b
s
x e c u t e S a l t c
n d s ( s a l t
s h )
A n s i b l e ma n a g e d s y s t e ms
u n n i n g p l a y b
s a s S a l t j
s .
x e c u t e A n s i b l e mo d u l e s
t h e s a l t
n i
s y s t e m.
u n n i n g p l a y b
s i n S L S fj l e s !
24
n s i b l e mo d u l e s
l a y b
s
x e c u t e S a l t c
n d s ( s a l t
s h )
A n s i b l e ma n a g e d s y s t e ms
e w g r
n g S a l t ma n a g e d I T
v e n t
r i v e n
c h e s t r a t i
a h y b r i d e n v i r
me n t
25
26
n a g e y
r l e g a c y A n s i b l e a s S a l t j
s .
e a l
i me mo n i t
i n g a n d e v e n t
r i v e n
c h e s t r a t i
i n a l l y
r I T ( s a l t
n i
)
h e wh
e mi n i
f u n c t i
a l i t y
t h e
d A n s i b l e ma n a g e d s y s t e ms .
27
28
31