Skip to content

Instantly share code, notes, and snippets.

@h3ct0rjs
Created July 16, 2020 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save h3ct0rjs/b8b726d1ae13fa1e19a0e23c233de7fe to your computer and use it in GitHub Desktop.
Save h3ct0rjs/b8b726d1ae13fa1e19a0e23c233de7fe to your computer and use it in GitHub Desktop.
--- #Install Maria DB
- hosts: localhost
remote_user: ansible
become: yes
become_method: sudo
connection: ssh
gather_facts: yes
tasks:
- name : Installing MariDB
yum:
name: mariadb-server
state: latest
notify:
- startservice
handlers:
- name: startservice
service:
name: mariadb
state: restarted
@h3ct0rjs
Copy link
Author

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [Installing MariDB] *******************************************************
changed: [localhost]

RUNNING HANDLER [startservice] *************************************************
changed: [localhost]

PLAY RECAP *********************************************************************
localhost : ok=3 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment