Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 92e79d29 authored by freezed's avatar freezed :mountain:
Browse files

:twisted_rightwards_arrows: Merge branch 'user'

parents 0ef4b8b5 ad6c5ae0
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ help: # Print help on Makefile ...@@ -3,7 +3,7 @@ help: # Print help on Makefile
sed "s/\(.\+\):\s*\(.*\) #\s*\(.*\)/`printf "\e[1;33;4;40m"`\1`printf "\033[0m"` \3/" | \ sed "s/\(.\+\):\s*\(.*\) #\s*\(.*\)/`printf "\e[1;33;4;40m"`\1`printf "\033[0m"` \3/" | \
expand -t20 expand -t20
clean: # Remove files not tracked in source control clean: # Remove files not in source control
find . -type f -name "*.retry" -delete find . -type f -name "*.retry" -delete
find . -type f -name "*.orig" -delete find . -type f -name "*.orig" -delete
......
...@@ -79,4 +79,6 @@ timezone="Europe/Paris" ...@@ -79,4 +79,6 @@ timezone="Europe/Paris"
user_shell=/bin/zsh user_shell=/bin/zsh
[workstation:vars] [workstation:vars]
git_email=<GIT_EMAIL>
git_name=<GIT_NAME>
timezone="Europe/Paris" timezone="Europe/Paris"
...@@ -20,6 +20,13 @@ ...@@ -20,6 +20,13 @@
loop_control: loop_control:
label: "{{ item | basename }}" label: "{{ item | basename }}"
- name: MY USER | git config
become: true
ansible.builtin.template:
dest: "/home/{{ my_user }}/.gitconfig"
src: templates/gitconfig.j2
mode: 0640
- name: MY USER | ssh config - name: MY USER | ssh config
become: true become: true
ansible.builtin.template: ansible.builtin.template:
......
...@@ -47,3 +47,7 @@ ...@@ -47,3 +47,7 @@
[init] [init]
defaultBranch = stable defaultBranch = stable
[user]
name = "{{ git_name }}"
email = "{{ git_email }}"
#jinja2:lstrip_blocks: True
# ############################################# #
# This file is managed by Ansible #
# https://lab.frogg.it/freezed/ansible-debian #
# ############################################# #
{% if inventory_hostname in groups['station'] or inventory_hostname in groups['backup'] %}
# WAN
{% for host in groups['production'] %}
Host {{ host }}
User {{ hostvars[host]['my_user'] }}
Hostname {{ hostvars[host]['ansible_host'] }}
Port {{ hostvars[host]['ansible_port'] }}
{% endfor %}
{% endif %}
{% if inventory_hostname in groups['station'] or inventory_hostname in groups['production'] %}
# BKP
{% for host in groups['backup'] %}
Host {{ host }}
User {{ hostvars[host]['my_user'] }}
Hostname {{ hostvars[host]['ansible_host'] }}
Port {{ hostvars[host]['ansible_port'] }}
{% endfor %}
{% endif %}
{% if inventory_hostname in groups['station'] %}
# DEV
{% for host in groups['devel'] %}
Host {{ host }}
User {{ hostvars[host]['my_user'] }}
Hostname {{ hostvars[host]['ansible_host'] }}
Port {{ hostvars[host]['ansible_port'] }}
{% endfor %}
# LOCAL
{% for host in groups['station'] %}
Host {{ host }}
User {{ hostvars[host]['my_user'] }}
Hostname {{ hostvars[host]['ansible_host'] }}
Port {{ hostvars[host]['ansible_port'] }}
{% endfor %}
{% endif %}
#jinja2:lstrip_blocks: True
# ############################################# #
# This file is managed by Ansible #
# https://lab.frogg.it/freezed/ansible-debian #
# ############################################# #
{% for host in groups['all'] %}
Host {{ host }}
User {{ hostvars[host]['my_user'] }}
Hostname {{ hostvars[host]['ansible_host'] }}
Port {{ hostvars[host]['ansible_port'] }}
{% endfor %}
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