corrected interfaces file

This commit is contained in:
Tanguy MAZE 2018-12-11 15:26:22 +01:00
parent 13509900fe
commit af72857616
4 changed files with 15 additions and 7 deletions

View File

@ -21,5 +21,4 @@ allow-hotplug enp0s8
iface enp0s8 inet static iface enp0s8 inet static
address 192.168.99.2 address 192.168.99.2
netmask 255.255.255.252 netmask 255.255.255.252
gateway 192.168.99.1

View File

@ -1,2 +1,2 @@
e3r4p3.42.fr ansible_port=2230 ansible_user=tanguy e1r9p4.42.fr ansible_port=2230 ansible_user=tanguy
roger-skyline-1 ansible_host=192.168.99.2 ansible_port=2230 ansible_user=tanguy roger-skyline-1 ansible_host=192.168.99.2 ansible_port=2230 ansible_user=tanguy

View File

@ -1,5 +1,5 @@
- name: "Initialise network config, packages & user tanguy" - name: "Initialise network config, packages & user tanguy"
hosts: "e3r4p3.42.fr" hosts: "e1r9p4.42.fr"
become: yes become: yes
become_user: root become_user: root
become_method: su become_method: su
@ -16,6 +16,16 @@
dest: "/etc/ssh/" dest: "/etc/ssh/"
owner: "root" owner: "root"
group: "root" group: "root"
- name: "Install sudo"
apt:
name: ['sudo']
update_cache: "yes"
state: "present"
- name: "Add tanguy to sudoers"
user:
name: "tanguy"
groups: "sudo"
append: yes
- name: "Upload public key for tanguy" - name: "Upload public key for tanguy"
authorized_key: authorized_key:
user: "tanguy" user: "tanguy"
@ -23,7 +33,4 @@
key: "{{ lookup('file', '/Users/tmaze/.ssh/id_rsa.pub') }}" key: "{{ lookup('file', '/Users/tmaze/.ssh/id_rsa.pub') }}"
- name: "Reboot VM" - name: "Reboot VM"
reboot: reboot:
reboot_timeout: 180 reboot_timeout: 60

View File

@ -75,6 +75,8 @@
group: "root" group: "root"
- name: "Activate nice website" - name: "Activate nice website"
command: "a2ensite default-ssl" command: "a2ensite default-ssl"
- name: "Activate ssl module"
command: "a2enmod ssl"
- name: "Restart apache2" - name: "Restart apache2"
service: service:
name: "apache2" name: "apache2"