Merge branch 'master' of git_opytex:/lafrite/Ansible_workstation
This commit is contained in:
commit
67eb6a5e9d
24
BV_boutique.yml
Normal file
24
BV_boutique.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
connection: local
|
||||||
|
|
||||||
|
vars_files:
|
||||||
|
- vars/common.yml
|
||||||
|
- vars/server.yml
|
||||||
|
- vars/BV_boutique.yml
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- include: tasks/ansible.yml
|
||||||
|
- include: tasks/deb_CLI_packages.yml
|
||||||
|
- include: tasks/prompt.yml
|
||||||
|
- include: tasks/users.yml
|
||||||
|
- include: tasks/sudo.yml
|
||||||
|
- include: tasks/ssh.yml
|
||||||
|
- include: tasks/dotfiles.yml
|
||||||
|
- include: tasks/deb_docker.yml
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
- name: restart sshd
|
||||||
|
service:
|
||||||
|
name: sshd
|
||||||
|
state: restarted
|
@ -15,7 +15,7 @@
|
|||||||
- include: tasks/pacman_cache_server.yml
|
- include: tasks/pacman_cache_server.yml
|
||||||
- include: tasks/arch_CLI_packages.yml
|
- include: tasks/arch_CLI_packages.yml
|
||||||
- include: tasks/prompt.yml
|
- include: tasks/prompt.yml
|
||||||
# - include: tasks/users.yml
|
- include: tasks/users.yml
|
||||||
- include: tasks/sudo.yml
|
- include: tasks/sudo.yml
|
||||||
- include: tasks/ssh.yml
|
- include: tasks/ssh.yml
|
||||||
- include: tasks/arch_programming.yml
|
- include: tasks/arch_programming.yml
|
||||||
|
@ -14,6 +14,16 @@ Host Embrevade
|
|||||||
identityfile ~/.ssh/id_ed25519_embrevade
|
identityfile ~/.ssh/id_ed25519_embrevade
|
||||||
IdentitiesOnly yes
|
IdentitiesOnly yes
|
||||||
|
|
||||||
|
Host BV_boutique
|
||||||
|
HostName vps789921.ovh.net
|
||||||
|
User waha
|
||||||
|
Port 22
|
||||||
|
ForwardAgent yes
|
||||||
|
PubkeyAcceptedKeyTypes *
|
||||||
|
identityfile ~/.ssh/id_rsa_manioc
|
||||||
|
IdentitiesOnly yes
|
||||||
|
|
||||||
|
|
||||||
Host git_opytex
|
Host git_opytex
|
||||||
HostName git.opytex.org
|
HostName git.opytex.org
|
||||||
User git
|
User git
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
|
|
||||||
- name: Install base CLI packages
|
- name: Install base CLI packages
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name:
|
||||||
state: present
|
|
||||||
with_items:
|
|
||||||
- sudo
|
- sudo
|
||||||
- wget
|
- wget
|
||||||
- curl
|
- curl
|
||||||
@ -26,6 +24,7 @@
|
|||||||
- glances
|
- glances
|
||||||
- ranger
|
- ranger
|
||||||
- rxvt-unicode-256color
|
- rxvt-unicode-256color
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Install extra CLI packages
|
- name: Install extra CLI packages
|
||||||
apt:
|
apt:
|
||||||
|
@ -1,20 +1,19 @@
|
|||||||
---
|
---
|
||||||
- name: Remove depot docker version
|
- name: Remove depot docker version
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name:
|
||||||
state: absent
|
|
||||||
with_items:
|
|
||||||
- docker
|
- docker
|
||||||
- docker-engine
|
- docker-engine
|
||||||
- docker.io
|
- docker.io
|
||||||
|
state: absent
|
||||||
|
|
||||||
- name: Install tool to use apt with https
|
- name: Install tool to use apt with https and gpg
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name:
|
||||||
state: present
|
|
||||||
with_items:
|
|
||||||
- apt-transport-https
|
- apt-transport-https
|
||||||
- ca-certificates
|
- ca-certificates
|
||||||
|
- gpg
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Add Docker apt key.
|
- name: Add Docker apt key.
|
||||||
apt_key:
|
apt_key:
|
||||||
|
@ -119,6 +119,7 @@
|
|||||||
owner: "{{ item.username }}"
|
owner: "{{ item.username }}"
|
||||||
group: "{{ item.group }}"
|
group: "{{ item.group }}"
|
||||||
with_items: "{{ me }}"
|
with_items: "{{ me }}"
|
||||||
|
when: not server
|
||||||
|
|
||||||
- name: Copy ssh user config
|
- name: Copy ssh user config
|
||||||
template:
|
template:
|
||||||
@ -127,6 +128,7 @@
|
|||||||
owner: "{{ item.username }}"
|
owner: "{{ item.username }}"
|
||||||
group: "{{ item.group }}"
|
group: "{{ item.group }}"
|
||||||
with_items: "{{ deploy_users }}"
|
with_items: "{{ deploy_users }}"
|
||||||
|
when: not server
|
||||||
|
|
||||||
- name: Copy ssh user config
|
- name: Copy ssh user config
|
||||||
template:
|
template:
|
||||||
@ -135,6 +137,7 @@
|
|||||||
owner: "{{ item.username }}"
|
owner: "{{ item.username }}"
|
||||||
group: "{{ item.group }}"
|
group: "{{ item.group }}"
|
||||||
with_items: "{{ me }}"
|
with_items: "{{ me }}"
|
||||||
|
when: not server
|
||||||
|
|
||||||
# Git config
|
# Git config
|
||||||
- name: Copy gitconfig
|
- name: Copy gitconfig
|
||||||
@ -144,3 +147,4 @@
|
|||||||
owner: "{{ item.username }}"
|
owner: "{{ item.username }}"
|
||||||
group: "{{ item.group }}"
|
group: "{{ item.group }}"
|
||||||
with_items: "{{ me }}"
|
with_items: "{{ me }}"
|
||||||
|
when: not server
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
shell: "{{ prompt_place['stdout'] }}"
|
shell: "{{ prompt_place['stdout'] }}"
|
||||||
state: present
|
state: present
|
||||||
with_items: "{{ deploy_users }}"
|
with_items: "{{ deploy_users }}"
|
||||||
|
when: create_user
|
||||||
|
|
||||||
- name: Add me
|
- name: Add me
|
||||||
user:
|
user:
|
||||||
@ -25,3 +26,4 @@
|
|||||||
shell: "{{ prompt_place['stdout'] }}"
|
shell: "{{ prompt_place['stdout'] }}"
|
||||||
state: present
|
state: present
|
||||||
with_items: "{{ me }}"
|
with_items: "{{ me }}"
|
||||||
|
when: create_user
|
||||||
|
9
vars/BV_boutique.yml
Normal file
9
vars/BV_boutique.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
deploy_public_key: id_rsa_manioc.pub
|
||||||
|
|
||||||
|
deploy_users:
|
||||||
|
- username: 'waha'
|
||||||
|
password: '$6$tQLlZ3lI/NDcT3.C$VCBzrpNxDgOK7b2que2/BnAYWl.zKVugZrQEPxtsq3iWcskEzQ1NvytZRXkB4GCDa/xEohxiodyCaZyFnhxby1'
|
||||||
|
uid: '1001'
|
||||||
|
group: wheel
|
||||||
|
groups: sudo
|
@ -17,4 +17,5 @@ prompt: 'fish'
|
|||||||
|
|
||||||
minimal: false
|
minimal: false
|
||||||
server: false
|
server: false
|
||||||
|
create_user: false
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user