First commit

This commit is contained in:
VC
2019-09-04 09:06:55 +02:00
commit dded46ff64
144 changed files with 7495 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
- name: install https transport for apt
package:
name: apt-transport-https
state: present

View File

@@ -0,0 +1,5 @@
- name: install aptitude
package:
name: aptitude
state: present
when: ansible_facts['os_family'] == 'Debian'

View File

@@ -0,0 +1,6 @@
- name: copy basic bashrc files
copy:
src: files/dotbashrc
dest: /root/.bashrc
owner: root
group: root

View File

@@ -0,0 +1,10 @@
- name: install cron-apt
package:
name: cron-apt
state: present
- name: default configuration file
copy:
src: files/5-install
dest: /etc/cron-apt/action.d/5-install

View File

@@ -0,0 +1,4 @@
- name: install cron
package:
name: cron
state: present

View File

@@ -0,0 +1,4 @@
- name: install curl
package:
name: curl
state: present

View File

@@ -0,0 +1,4 @@
- name: install gpg package
package:
name: gpg
state: present

View File

@@ -0,0 +1,22 @@
- name: Set default locale to fr_FR.UTF-8
debconf:
name: locales
question: locales/default_environment_locale
value: fr_FR.UTF-8
vtype: select
- name: set to generate locales fr_FR/en_US
debconf:
name: locales
question: locales/locales_to_be_generated
value: en_US.UTF-8 UTF-8, fr_FR.UTF-8 UTF-8
vtype: multiselect
- name: delete original locale.gen
file:
path: /etc/locale.gen
state: absent
when: ansible_facts['env']['LANG'] != 'fr_FR.UTF-8'
- name: update original locale.gen
command: dpkg-reconfigure -f noninteractive locales
when: ansible_facts['env']['LANG'] != 'fr_FR.UTF-8'

View File

@@ -0,0 +1,4 @@
- file:
src: /usr/share/zoneinfo/Europe/Paris
dest: /etc/localtime
state: link

View File

@@ -0,0 +1,14 @@
- include_tasks: aptitude.yml
- include_tasks: localtime.yml
- include_tasks: locales.yml
- include_tasks: ping.yml
- include_tasks: telnet.yml
- include_tasks: bashrc.yml
- include_tasks: vimrc.yml
- include_tasks: sshd.yml
- include_tasks: curl.yml
- include_tasks: wget.yml
- include_tasks: cron.yml
- include_tasks: apt-transport-https.yml
- include_tasks: gpg.yml
- include_tasks: cron-apt.yml

View File

@@ -0,0 +1,4 @@
- name: install ping utility
package:
name: iputils-ping
state: present

View File

@@ -0,0 +1,18 @@
- name: ssh configuration file
template:
src: sshd_config.j2
dest: /etc/ssh/sshd_config
notify:
- restart sshd
- name: ssh keys home
authorized_key:
user: root
state: present
key: "{{ lookup('file', 'ssh/home.id_rsa.pub') }}"
- name: ssh keys work
authorized_key:
user: root
state: present
key: "{{ lookup('file', 'ssh/work.id_rsa.pub') }}"

View File

@@ -0,0 +1,4 @@
- name: install telnet
package:
name: telnet
state: present

View File

@@ -0,0 +1,11 @@
- name: install vim package
package:
name: vim
state: present
- name: copy vimrc config file
copy:
src: files/vim/
dest: /root/.vim
owner: root
group: root

View File

@@ -0,0 +1,4 @@
- name: install wget package
package:
name: wget
state: present