Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible_example

First, copy the application:

git clone git@github.com:gooodh/Ansible_example.git

Install dependencies:

uv sync

Specify the host and user in inventory/hosts.yml

all:
  vars:
    ansible_ssh_private_key_file: /home/nikulin/.ssh/id_rsa
  hosts:
    vm:
      ansible_host: 192.168.56.101
      ansible_user: vboxuser

Start playbook command:

▶ Запуск всех ролей:

ansible-playbook playbooks/start_settings.yml -i inventory/hosts.yml -K

▶ Запуск всех ролей, подробный вывод:

ansible-playbook playbooks/start_settings.yml -i inventory/hosts.yml -K -vvv

▶ Запуск только fail2ban:

ansible-playbook playbooks/start_settings.yml -i inventory/hosts.yml -K --tags fail2ban

▶ Запуск всего, кроме одной роли:

ansible-playbook playbooks/start_settings.yml -i inventory/hosts.yml -K --skip-tags nginx

▶ Несколько ролей:

ansible-playbook playbooks/start_settings.yml -i inventory/hosts.yml -K --tags "nginx,firewalld"

About

This is an example of using Ansible automation. Roles install docker, fail2ban, firewalld, nginx, nginx-ssl, postgresql, python-project, update-packages

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages