Add post, Update hugo.toml
This commit is contained in:
44
content/posts/ansible.md
Normal file
44
content/posts/ansible.md
Normal file
@ -0,0 +1,44 @@
|
||||
---
|
||||
author: "Roland Thomas Jr"
|
||||
title: "Ansible Rocks!"
|
||||
date: "2023-06-08"
|
||||
description: ""
|
||||
tags: ["ansible"]
|
||||
ShowToc: false
|
||||
ShowBreadCrumbs: false
|
||||
---
|
||||
|
||||
What is Ansible?
|
||||
|
||||
```yml
|
||||
---
|
||||
- name: Update web servers
|
||||
hosts: webservers
|
||||
remote_user: root
|
||||
|
||||
tasks:
|
||||
- name: Ensure apache is at the latest version
|
||||
ansible.builtin.yum:
|
||||
name: httpd
|
||||
state: latest
|
||||
- name: Write the apache config file
|
||||
ansible.builtin.template:
|
||||
src: /srv/httpd.j2
|
||||
dest: /etc/httpd.conf
|
||||
|
||||
- name: Update db servers
|
||||
hosts: databases
|
||||
remote_user: root
|
||||
|
||||
tasks:
|
||||
- name: Ensure postgresql is at the latest version
|
||||
ansible.builtin.yum:
|
||||
name: postgresql
|
||||
state: latest
|
||||
- name: Ensure that postgresql is started
|
||||
ansible.builtin.service:
|
||||
name: postgresql
|
||||
state: started
|
||||
```
|
||||
|
||||
---
|
@ -10,4 +10,8 @@ ShowBreadCrumbs: false
|
||||
|
||||
Welcome to rtj.dev!
|
||||
|
||||
```python
|
||||
print('Hello, World!')
|
||||
```
|
||||
|
||||
---
|
Reference in New Issue
Block a user