How to make and run Ansible Playbooks in CentOS 7?

Issues related to applications and software problems
Post Reply
prabha_friend
Posts: 17
Joined: 2020/06/10 14:05:16

How to make and run Ansible Playbooks in CentOS 7?

Post by prabha_friend » 2020/09/11 14:50:18

Hi All,
I am reading a book to install and work on Asterisk 16.
I am a beginner to both Linux and Asterisk but started reading the book properly and got stuck on a place in the book

In that book, the Author just mentioned the below task:
Create an Ansible playbook in the file ~/ansible/playbooks/starfish.yml

As I am new to Linux and Ansible, I need your help in this...

It is better if someone teaches me the steps to create, edit and save the "starfish.yml" file.

Thanks a lot..
-Prabhakaran

User avatar
jlehtone
Posts: 3044
Joined: 2007/12/11 08:17:33
Location: Finland

Re: How to make and run Ansible Playbooks in CentOS 7?

Post by jlehtone » 2020/09/11 15:29:42

The name of the file is arbitrary. More important is what do you want to do with that play? What actions?

Ansible has documentation: https://docs.ansible.com/ansible/latest/


PS. CentOS SIG has repositories of more up to date ansible versions. For example:

Code: Select all

sudo yum install centos-release-ansible-29
That repo lets you install way more recent ansible than what is in base.

User avatar
TrevorH
Forum Moderator
Posts: 29493
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to make and run Ansible Playbooks in CentOS 7?

Post by TrevorH » 2020/09/12 13:52:38

I'm not sure those SIG packages are maintained. EPEL has ansible 2.9.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 3044
Joined: 2007/12/11 08:17:33
Location: Finland

Re: How to make and run Ansible Playbooks in CentOS 7?

Post by jlehtone » 2020/09/12 18:01:51

Maintained or not, SIG repo has got packages semi-frequently and relatively recently:

Code: Select all

...
ansible-2.9.10-2.el7.noarch.rpm	30.6.2020
ansible-2.9.11-1.el7.noarch.rpm	21.7.2020
ansible-2.9.12-1.el7.noarch.rpm	11.8.2020
ansible-2.9.13-1.el7.noarch.rpm	1.9.2020

User avatar
TrevorH
Forum Moderator
Posts: 29493
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to make and run Ansible Playbooks in CentOS 7?

Post by TrevorH » 2020/09/12 18:06:03

Yes, those are more recent than EPEL's 2.9.10.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Software Support”