Skip to content
Snippets Groups Projects
Commit a98ebd12 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Linting

parent 16a769af
Branches main
No related tags found
No related merge requests found
---
uptime_mode: main
uptime_domain: localhost:8082
uptime_username: uptime
......
......@@ -9,58 +9,58 @@
- block:
- name: Ensure uptime user
mongodb_user:
database: uptime
login_database: admin
login_user: root
login_password: root
name: root
password: root
ignore_errors: yes
when: uptime_mode == 'main'
- name: Ensure uptime user
mongodb_user:
database: uptime
login_database: admin
login_user: root
login_password: root
name: root
password: root
ignore_errors: yes
when: uptime_mode == 'main'
- name: Ensure directory
file:
path: /var/www
state: directory
mode: 0755
- name: Ensure directory
file:
path: /var/www
state: directory
mode: 0755
- name: Checkout latest version of Uptime
git:
repo: https://gitlab.lakedrops.com/tools/uptime.git
dest: /var/www/uptime
force: yes
notify:
- Restart Uptime
- name: Checkout latest version of Uptime
git:
repo: https://gitlab.lakedrops.com/tools/uptime.git
dest: /var/www/uptime
force: yes
notify:
- Restart Uptime
- name: Install node components
npm:
path: /var/www/uptime
notify:
- Restart Uptime
- name: Install node components
npm:
path: /var/www/uptime
notify:
- Restart Uptime
- name: Configure uptime
template:
src: production.yaml
dest: /var/www/uptime/config/production.yaml
owner: root
group: root
mode: 0644
notify:
- Restart Uptime
- name: Configure uptime
template:
src: production.yaml
dest: /var/www/uptime/config/production.yaml
owner: root
group: root
mode: 0644
notify:
- Restart Uptime
- name: List Patches
shell: ls /var/www/uptime/patches -1
register: patch_list
- name: List Patches
shell: ls /var/www/uptime/patches -1
register: patch_list
- name: Apply Patches
shell: patch -p1 --ignore-whitespace --forward < /var/www/uptime/patches/{{ item }}
args:
chdir: /var/www/uptime
with_items: '{{ patch_list.stdout_lines }}'
ignore_errors: yes
notify:
- Restart Uptime
- name: Apply Patches
shell: patch -p1 --ignore-whitespace --forward < /var/www/uptime/patches/{{ item }}
args:
chdir: /var/www/uptime
with_items: '{{ patch_list.stdout_lines }}'
ignore_errors: yes
notify:
- Restart Uptime
when: not excluded_roles or "uptime" not in excluded_roles
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment