Resources attached to the Road To DevOps tutorial https://blog.noobtoroot.xyz/road-to-devops/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

40 lines
748 B

- name: Enable EPEL Repository on CentOS 7
yum:
name: epel-release
state: latest
when:
- ansible_os_family == "RedHat"
- name: install mariadb-server
yum:
name:
- postgresql-server
- python-setuptools
- python-psycopg2
state: present
update_cache: yes
when:
- ansible_os_family == "RedHat"
- name: Install postgresql
apt:
name:
- postgresql-server
- python-setuptools
- python-psycopg2
when:
- ansible_os_family == "Debian"
- name:
service:
name: postgresql
state: started
enabled: yes
- name:
firewalld:
port: 5432/tcp
permanent: true
state: enabled
immediate: yes