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
<html> | |
<body> | |
<h1 align="center">Hello, from ansible managed server!</h1> | |
<h1 align="center">My VPC IP is {{ hostvars['<YOUR NAME>']['ansible_host'] }}</h1> | |
<h1 align="center">I love {{ food }}</h1> <!-- Добавим ссылку на нашу переменную--> | |
</body> | |
</html> |
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
Создатель роли допустил ошибку. | |
В файле .imported_role/ansible-role-universal-tomcat/templates/server.xml.j2 | |
нужно обернуть в кавычки версию Tomcat: | |
{% if tomcat_version_major < '8' %} |
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
test111 |
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 apt | |
apt: | |
update_cache: yes | |
- name: install nginx | |
apt: | |
name: nginx | |
state: present |
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: configure nginx | |
template: | |
src: default.j2 | |
dest: /etc/nginx/sites-enabled/default |
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: make folder for app | |
file: | |
path: /srv/web | |
state: directory |
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: create index page | |
template: | |
src: index.html.j2 | |
dest: /srv/web/index.html |
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: create page for countries | |
template: | |
src: countries.html.j2 | |
dest: /srv/web/countries.html |
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: | |
- nginx |
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: MongoDB - add pgp key | |
apt_key: | |
url: https://www.mongodb.org/static/pgp/server-4.0.asc | |
state: present | |
- name: MongoDB - add repository | |
apt_repository: | |
filename: '/etc/apt/sources.list.d/mongodb.list' | |
repo: "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" |
OlderNewer