Skip to content
Snippets Groups Projects
Verified Commit 6d5cd2a5 authored by me5na7qbjqbrp's avatar me5na7qbjqbrp
Browse files

Fix moinmoin-gendoc regex

parent 14f02b8d
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
......@@ -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"
= 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
#!/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 }}"
......
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