Created
January 26, 2022 05:28
-
-
Save esenthil2018/b79d643ea82d1da50a703329cd0af6d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment