Fix moinmoin-gendoc regex
parent
14f02b8d76
commit
6d5cd2a567
|
@ -69,7 +69,7 @@ def edit_ticket(url, cookie):
|
||||||
# Search for ticket
|
# Search for ticket
|
||||||
search = re.search('name=\"ticket\" value=\"([^\"]*)\"', content)
|
search = re.search('name=\"ticket\" value=\"([^\"]*)\"', content)
|
||||||
assert search, 'no edit ticket was found'
|
assert search, 'no edit ticket was found'
|
||||||
return search[1]
|
return search.group(1)
|
||||||
|
|
||||||
|
|
||||||
def edit(url, user, password, content, revision_comment):
|
def edit(url, user, password, content, revision_comment):
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
- name: "Create wiki page documenting {{ ansible_hostname }} (physical)"
|
- name: "Create wiki page documenting {{ ansible_hostname }} (physical)"
|
||||||
when: ansible_system_vendor != 'QEMU'
|
when: ansible_system_vendor != 'QEMU'
|
||||||
moinmoin_page:
|
moinmoin_page:
|
||||||
url: "{{ moinmoin_base_url }}/Serveur{{ ansible_hostname|title }}"
|
url: "{{ moinmoin_base_url }}/Serveur{{ ansible_hostname|title }}/CaracteristiquesTechniques"
|
||||||
user: "{{ moinmoin_user }}"
|
user: "{{ moinmoin_user }}"
|
||||||
password: "{{ moinmoin_password }}"
|
password: "{{ moinmoin_password }}"
|
||||||
content: "{{ lookup('template', 'server.j2') }}"
|
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)"
|
- name: "Create wiki page documenting {{ ansible_hostname }} (virtual)"
|
||||||
when: ansible_system_vendor == 'QEMU'
|
when: ansible_system_vendor == 'QEMU'
|
||||||
moinmoin_page:
|
moinmoin_page:
|
||||||
url: "{{ moinmoin_base_url }}/Virtuels/Serveur{{ ansible_hostname|title }}"
|
url: "{{ moinmoin_base_url }}/Virtuels/Serveur{{ ansible_hostname|title }}/CaracteristiquesTechniques"
|
||||||
user: "{{ moinmoin_user }}"
|
user: "{{ moinmoin_user }}"
|
||||||
password: "{{ moinmoin_password }}"
|
password: "{{ moinmoin_password }}"
|
||||||
content: "{{ lookup('template', 'server.j2') }}"
|
content: "{{ lookup('template', 'server.j2') }}"
|
||||||
revision_comment: "Ansible running for {{ ansible_hostname }}"
|
revision_comment: "{{ ansible_env.SUDO_USER }} is running Ansible"
|
||||||
|
|
|
@ -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 ==
|
== Caractéristiques matérielles ==
|
||||||
|
|
||||||
{% if ansible_form_factor != 'Other' and ansible_form_factor != 'Unknown' %}
|
{% 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).
|
divisé(s) en {{ ansible_processor_threads_per_core }} thread(s).
|
||||||
|
|
||||||
'''Mémoire''' :
|
'''Mémoire''' :
|
||||||
{{ (ansible_memory_mb.real.total/1024)|round(1) }} GB de mémoire RAM
|
{{ (ansible_memory_mb.real.total/1024)|round(1) }} GiB de mémoire RAM
|
||||||
et {{ (ansible_memory_mb.swap.total/1024)|round(1) }} GB de SWAP.
|
et {{ (ansible_memory_mb.swap.total/1024)|round(1) }} GiB de SWAP.
|
||||||
|
|
||||||
=== Stockage ===
|
=== Stockage ===
|
||||||
|
|
||||||
|
@ -57,6 +55,3 @@ et {{ (ansible_memory_mb.swap.total/1024)|round(1) }} GB de SWAP.
|
||||||
'''BIOS installé''' :
|
'''BIOS installé''' :
|
||||||
{{ ansible_bios_version }} datant du {{ ansible_bios_date }}
|
{{ ansible_bios_version }} datant du {{ ansible_bios_date }}
|
||||||
|
|
||||||
----
|
|
||||||
CatégorieCrans CatégorieCrans/LesServeurs
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env ansible-playbook
|
#!/usr/bin/env ansible-playbook
|
||||||
---
|
---
|
||||||
# Document servers
|
# 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:
|
vars:
|
||||||
moinmoin_user: "{{ vault_moinmoin_user }}"
|
moinmoin_user: "{{ vault_moinmoin_user }}"
|
||||||
moinmoin_password: "{{ vault_moinmoin_password }}"
|
moinmoin_password: "{{ vault_moinmoin_password }}"
|
||||||
|
|
Loading…
Reference in New Issue