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: 'Load data into database' | |
shell: psql -f {{item}} application && touch {{item}}.lock | |
args: | |
chdir: /var/lib/postgresql | |
creates: "{{item}}.lock" | |
become: true | |
become_user: postgres | |
loop: | |
- petstore-schema.sql |
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
tasks: # <-- Добавим задачи в наш сценарий | |
- name: 'Copy database schema file' # <-- См. Gist 1 | |
copy: | |
src: ../files/petstore-schema.sql | |
dest: /var/lib/postgresql/petstore-schema.sql | |
owner: postgres | |
group: postgres | |
mode: 0600 | |
- name: 'Copy database data file' # <-- См. Gist 2 | |
copy: |
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
- hosts: web | |
become: true | |
roles: | |
- ansible-role-universal-tomcat |
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
tomcat_version: "7.0.76" | |
tomcat_port_connector: 8080 |
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
- src: https://github.com/Stouts/Stouts.iptables.git | |
version: 1.1.4 | |
- src: geerlingguy.postgresql | |
- src: git+https://github.com/ChristopherDavenport/ansible-role-universal-tomcat | |
version: f0fe23a3b1541cbc60cabe69afe401f3df07d5d3 |
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
postgresql_version: 9.5 | |
postgresql_users: | |
- name: appuser | |
pass: password | |
encrypted: yes | |
postgresql_databases: | |
- name: application | |
owner: appuser |
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
- hosts: web | |
become: true | |
roles: | |
- Stouts.iptables |
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
test: | |
hosts: | |
myhost: | |
ansible_host: xx.xx.xx.xx | |
ansible_user: ubuntu | |
fake: | |
hosts: | |
fake_host: | |
ansible_host: xx.xx.xx.xx | |
ansible_user: ubuntu |
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: clone repo | |
git: | |
repo: <repo_url> # адрес репозитория | |
dest: /opt/reddit | |
version: microservices_for_mc |
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: install bundler | |
apt: | |
name: bundler | |
state: present | |
update_cache: true | |
- name: install ui/comment dependencies | |
bundler: | |
state: present |