Sfoglia il codice sorgente

generate random database password and save it to local facts

master
parent
commit
a18218b2b0
4 ha cambiato i file con 20 aggiunte e 0 eliminazioni
  1. +2
    -0
      defaults/main.yml
  2. +14
    -0
      tasks/local_facts.yaml
  3. +1
    -0
      tasks/main.yml
  4. +3
    -0
      vars/main.yml

+ 2
- 0
defaults/main.yml Vedi File

@@ -13,3 +13,5 @@ gitea_download_url: https://dl.gitea.io/gitea/{{gitea_download_version}}/{{gitea
gitea_admin_username: testadmin
gitea_admin_password: testadmin
gitea_admin_email: admin@example.com

gitea_database_password: "{{ ansible_local.gitea.database_password }}"

+ 14
- 0
tasks/local_facts.yaml Vedi File

@@ -0,0 +1,14 @@
---

- name: ansible local facts directory
file:
path: /etc/ansible/facts.d
state: directory

- name: set ansible local fact for gitea
copy:
content: "{{_gitea_local_facts|to_json}}"
dest: /etc/ansible/facts.d/gitea.fact

- name: Gathering Facts
setup:

+ 1
- 0
tasks/main.yml Vedi File

@@ -1,5 +1,6 @@
---

- import_tasks: local_facts.yaml
- import_tasks: setup.yaml
- import_tasks: download.yaml



+ 3
- 0
vars/main.yml Vedi File

@@ -1,3 +1,6 @@
_gitea_local_facts:
database_password: "{% if not ansible_local.gitea.database_password is defined %}{{ lookup('password', '/dev/null length=15 chars=ascii_letters') }}{% else %}{{ ansible_local.gitea.database_password }}{% endif %}"

_gitea_nginx_vhosts:
- name: gitea
server_names:


Loading…
Annulla
Salva