Browse Source

add missing tasks name

python3
Zolfa 5 years ago
parent
commit
db69a1f79f
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
8 changed files with 29 additions and 24 deletions
  1. +6
    -3
      roles/coturn/tasks/main.yaml
  2. +3
    -3
      roles/gitlab/tasks/main.yaml
  3. +1
    -1
      roles/lxc_guest/tasks/main.yaml
  4. +4
    -2
      roles/nextcloud/tasks/occ.yaml
  5. +2
    -2
      roles/nginx/tasks/main.yaml
  6. +3
    -3
      roles/service/tasks/main.yaml
  7. +4
    -3
      tasks/ca-dialog.yaml
  8. +6
    -7
      tasks/ca-signing-request.yaml

+ 6
- 3
roles/coturn/tasks/main.yaml View File

@ -16,7 +16,8 @@
slurp:
path: '/etc/coturn_rest.secret'
register: coturn_secret_slurp
- set_fact:
- name: 'set shared secret'
set_fact:
shared_secret: '{{ coturn_secret_slurp.content | b64decode }}'
when: (not renew_shared_secret) and (coturn_secret_stat.stat.exists)
@ -24,10 +25,12 @@
- name: 'generate new shared secret'
gen_passwd: 'length=32'
register: new_passwd
- copy:
- name: 'store new shared secret'
copy:
content: '{{ new_passwd.passwd }}'
dest: '/etc/coturn_rest.secret'
- set_fact:
- name: 'set shared secret'
set_fact:
shared_secret: '{{ new_passwd.passwd }}'
when: (renew_shared_secret) or (not coturn_secret_stat.stat.exists)
tags:


+ 3
- 3
roles/gitlab/tasks/main.yaml View File

@ -89,16 +89,16 @@
- name: 'MONITORING | add HTTP services'
block:
- name: 'MONITORING | fetch monitored HTTP for current host'
- name: 'MONITORING | add HTTP/gitlab to monitored service'
set_fact:
vhosts: >
{{ hostvars[monitoring_host]['monitoring_facts'][host_fqdn]['vhosts']
| default([]) }}
- name: 'MONITORING | add HTTP/{{ gitlab_fqdn }} to monitored service'
- name: 'MONITORING | add HTTP/mattermost to monitored service'
set_fact:
vhosts: '{{ vhosts + [gitlab_fqdn] }}'
when: enable_https
- name: 'MONITORING | add HTTP/{{ mattermost_fqdn }} to monitored service'
- name: 'MONITORING | update host monitoring entry'
set_fact:
vhosts: '{{ vhosts + [mattermost_fqdn] }}'
when: enable_mattermost


+ 1
- 1
roles/lxc_guest/tasks/main.yaml View File

@ -86,7 +86,7 @@
- name: 'MONITORING | add to monitored hosts'
block:
- name: 'MONITORING | add HOST/{{ host_fqdn }} to monitored hosts'
- name: 'MONITORING | add to monitored hosts'
set_fact:
lxc_monitoring_entry: >
{{ { host_fqdn: { 'address': ansible_host } } }}


+ 4
- 2
roles/nextcloud/tasks/occ.yaml View File

@ -1,5 +1,6 @@
---
- command: 'php occ {{ occ_args }}'
- name: 'exec occ command'
command: 'php occ {{ occ_args }}'
become: true
become_user: 'www-data'
args:
@ -7,7 +8,8 @@
register: occ_out_raw
changed_when: occ_out_raw.changed and (not ignore_changes|default(false))
- set_fact:
- name: 'read occ output'
set_fact:
occ_out: '{{ occ_out_raw.stdout | from_json }}'
when: nojson is not defined
...

+ 2
- 2
roles/nginx/tasks/main.yaml View File

@ -35,9 +35,9 @@
state: 'link'
notify: 'restart nginx'
- name: 'MONITORNIG | add service HTTP/{{ server_fqdn }}'
- name: 'MONITORNIG | add HTTP services'
block:
- name: 'MONITORING | fetch monitored HTTP for current host'
- name: 'MONITORING | add HTTP/nginx to monitored service'
set_fact:
vhosts: >
{{ hostvars[monitoring_host]['monitoring_facts'][host_fqdn]['vhosts']


+ 3
- 3
roles/service/tasks/main.yaml View File

@ -1,6 +1,6 @@
---
- block:
- name: 'install {{ service_name }}'
- name: 'DEBIAN | install {{ service_name }}'
apt:
pkg: '{{ service_packages }}'
state: 'present'
@ -10,14 +10,14 @@
tags:
- 'packages'
- name: 'start {{ service_name }} at boot'
- name: 'DEBIAN | start {{ service_name }} at boot'
service:
name: '{{ service_name }}'
enabled: true
when: ansible_distribution != 'openwrt'
- block:
- name: 'install {{ service_name }}'
- name: 'OPENWRT | install {{ service_name }}'
opkg:
name: '{{ service_packages | join(" ") }}'
state: 'present'


+ 4
- 3
tasks/ca-dialog.yaml View File

@ -5,12 +5,13 @@
var: ca_request
verbosity: 2
- raw: "{{ ca_request | to_json }}"
delegate_to: authorities_request
- name: 'CA_MANAGER | sending request to ca...'
raw: '{{ ca_request | to_json }}'
delegate_to: 'authorities_request'
delegate_facts: True
register: request_result
failed_when: "( request_result.stdout | from_json ).failed"
- debug:
var: request_result
verbosity: 2
failed_when: '( request_result.stdout | from_json ).failed'

+ 6
- 7
tasks/ca-signing-request.yaml View File

@ -10,7 +10,8 @@
- name: 'CA_MANAGER | sending json signing request'
include: 'ca-dialog.yaml'
- set_fact:
- name: 'CA_MANAGER | read ca answer'
set_fact:
request_output: '{{ request_result.stdout | string | from_json }}'
- debug:
@ -22,7 +23,8 @@
type: 'get_certificate'
requestID: '{{ request_output.requestID }}'
- debug:
- name: 'CA_MANAGER | print request id'
debug:
msg: >
Please manually confirm sign request with id
{{ request_output.requestID }}
@ -30,13 +32,10 @@
- name: 'CA_MANAGER | waiting for certificate...'
include: 'ca-dialog.yaml'
- set_fact:
- name: 'CA MANAGER | read certificate'
set_fact:
cert_key: '{{ request_result.stdout | string | from_json }}'
- debug:
var: request_result
verbosity: 2
- name: 'CA_MANAGER | saving certificate'
copy:
content: '{{ cert_key.result }}'


Loading…
Cancel
Save