First commit
This commit is contained in:
4
roles/system/tasks/apt-transport-https.yml
Normal file
4
roles/system/tasks/apt-transport-https.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: install https transport for apt
|
||||
package:
|
||||
name: apt-transport-https
|
||||
state: present
|
5
roles/system/tasks/aptitude.yml
Normal file
5
roles/system/tasks/aptitude.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
- name: install aptitude
|
||||
package:
|
||||
name: aptitude
|
||||
state: present
|
||||
when: ansible_facts['os_family'] == 'Debian'
|
6
roles/system/tasks/bashrc.yml
Normal file
6
roles/system/tasks/bashrc.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
- name: copy basic bashrc files
|
||||
copy:
|
||||
src: files/dotbashrc
|
||||
dest: /root/.bashrc
|
||||
owner: root
|
||||
group: root
|
10
roles/system/tasks/cron-apt.yml
Normal file
10
roles/system/tasks/cron-apt.yml
Normal 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
|
||||
|
4
roles/system/tasks/cron.yml
Normal file
4
roles/system/tasks/cron.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: install cron
|
||||
package:
|
||||
name: cron
|
||||
state: present
|
4
roles/system/tasks/curl.yml
Normal file
4
roles/system/tasks/curl.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: install curl
|
||||
package:
|
||||
name: curl
|
||||
state: present
|
4
roles/system/tasks/gpg.yml
Normal file
4
roles/system/tasks/gpg.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: install gpg package
|
||||
package:
|
||||
name: gpg
|
||||
state: present
|
22
roles/system/tasks/locales.yml
Normal file
22
roles/system/tasks/locales.yml
Normal 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'
|
4
roles/system/tasks/localtime.yml
Normal file
4
roles/system/tasks/localtime.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- file:
|
||||
src: /usr/share/zoneinfo/Europe/Paris
|
||||
dest: /etc/localtime
|
||||
state: link
|
14
roles/system/tasks/main.yml
Normal file
14
roles/system/tasks/main.yml
Normal 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
|
4
roles/system/tasks/ping.yml
Normal file
4
roles/system/tasks/ping.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: install ping utility
|
||||
package:
|
||||
name: iputils-ping
|
||||
state: present
|
18
roles/system/tasks/sshd.yml
Normal file
18
roles/system/tasks/sshd.yml
Normal 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') }}"
|
4
roles/system/tasks/telnet.yml
Normal file
4
roles/system/tasks/telnet.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: install telnet
|
||||
package:
|
||||
name: telnet
|
||||
state: present
|
11
roles/system/tasks/vimrc.yml
Normal file
11
roles/system/tasks/vimrc.yml
Normal 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
|
4
roles/system/tasks/wget.yml
Normal file
4
roles/system/tasks/wget.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: install wget package
|
||||
package:
|
||||
name: wget
|
||||
state: present
|
Reference in New Issue
Block a user