Skip to content

Instantly share code, notes, and snippets.

@Andy-Knight
Created April 14, 2021 15:19
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 Andy-Knight/50ac4a08e2ab1c3ed1858ec24e1be0d5 to your computer and use it in GitHub Desktop.
Save Andy-Knight/50ac4a08e2ab1c3ed1858ec24e1be0d5 to your computer and use it in GitHub Desktop.
# Install packages and configuration for 2tier-app app server role
installAppRolePackages:
pkg.installed:
- pkgs:
- python
- httpd
- epel-release
- python-pip
- policycoreutils-python
startApache:
service.running:
- name: httpd
- enable: True
setSELinuxBoolean:
selinux.boolean:
- name: httpd_can_network_connect
- value: True
- persist: True
installPipFromCmd:
cmd.run:
- name: pip install requests
installAppScript:
file.managed:
- name: /var/www/cgi-bin/app.py
- source: salt://2tier-app/appScript.py
- user: apache
- group: apache
- mode: 755
- template: jinja
stopFirewall:
service.dead:
- name: firewalld
- enable: False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment