Fix moinmoin-gendoc regex

certbot_on_virtu
Alexandre Iooss 2020-07-01 09:25:36 +02:00
parent 14f02b8d76
commit 6d5cd2a567
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
4 changed files with 10 additions and 15 deletions

View File

@ -69,7 +69,7 @@ def edit_ticket(url, cookie):
# Search for ticket
search = re.search('name=\"ticket\" value=\"([^\"]*)\"', content)
assert search, 'no edit ticket was found'
return search[1]
return search.group(1)
def edit(url, user, password, content, revision_comment):

View File

@ -2,17 +2,17 @@
- name: "Create wiki page documenting {{ ansible_hostname }} (physical)"
when: ansible_system_vendor != 'QEMU'
moinmoin_page:
url: "{{ moinmoin_base_url }}/Serveur{{ ansible_hostname|title }}"
url: "{{ moinmoin_base_url }}/Serveur{{ ansible_hostname|title }}/CaracteristiquesTechniques"
user: "{{ moinmoin_user }}"
password: "{{ moinmoin_password }}"
content: "{{ lookup('template', 'server.j2') }}"
revision_comment: "Ansible running for {{ ansible_hostname }}"
revision_comment: "{{ ansible_env.SUDO_USER }} is running Ansible"
- name: "Create wiki page documenting {{ ansible_hostname }} (virtual)"
when: ansible_system_vendor == 'QEMU'
moinmoin_page:
url: "{{ moinmoin_base_url }}/Virtuels/Serveur{{ ansible_hostname|title }}"
url: "{{ moinmoin_base_url }}/Virtuels/Serveur{{ ansible_hostname|title }}/CaracteristiquesTechniques"
user: "{{ moinmoin_user }}"
password: "{{ moinmoin_password }}"
content: "{{ lookup('template', 'server.j2') }}"
revision_comment: "Ansible running for {{ ansible_hostname }}"
revision_comment: "{{ ansible_env.SUDO_USER }} is running Ansible"

View File

@ -1,8 +1,6 @@
= Serveur {{ ansible_hostname|capitalize }} =
## This was autogenerated by moinmoin-gendoc Ansible role
## please do not edit or your change will be overwritten
{% if wiki_doc_intro is defined %}
{{ wiki_doc_intro }}
{% endif %}
== Caractéristiques matérielles ==
{% if ansible_form_factor != 'Other' and ansible_form_factor != 'Unknown' %}
@ -22,8 +20,8 @@ avec {{ ansible_processor_cores }} cœur(s)
divisé(s) en {{ ansible_processor_threads_per_core }} thread(s).
'''Mémoire''' :
{{ (ansible_memory_mb.real.total/1024)|round(1) }} GB de mémoire RAM
et {{ (ansible_memory_mb.swap.total/1024)|round(1) }} GB de SWAP.
{{ (ansible_memory_mb.real.total/1024)|round(1) }} GiB de mémoire RAM
et {{ (ansible_memory_mb.swap.total/1024)|round(1) }} GiB de SWAP.
=== Stockage ===
@ -57,6 +55,3 @@ et {{ (ansible_memory_mb.swap.total/1024)|round(1) }} GB de SWAP.
'''BIOS installé''' :
{{ ansible_bios_version }} datant du {{ ansible_bios_date }}
----
CatégorieCrans CatégorieCrans/LesServeurs

View File

@ -1,7 +1,7 @@
#!/usr/bin/env ansible-playbook
---
# Document servers
- hosts: voyager.adm.crans.org # test only on voyager for now
- hosts: zamok.adm.crans.org # test only on voyager for now
vars:
moinmoin_user: "{{ vault_moinmoin_user }}"
moinmoin_password: "{{ vault_moinmoin_password }}"