Compare commits
No commits in common. "67626a455bce6dc2b78433ee593280558ab2caba" and "419448622427eeba94fb2bb7329b8043f9f21e98" have entirely different histories.
67626a455b
...
4194486224
@ -1 +1 @@
|
|||||||
<h1> Serveur pédagogique pour {{ item.name }} </h1>
|
<h1> Serveur pédagogique pour {{ name }} </h1>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: all
|
- hosts: 127.0.0.1
|
||||||
#ask_pass: true
|
connection: local
|
||||||
become: true
|
become: true
|
||||||
vars_files:
|
vars_files:
|
||||||
- vars/default.yml
|
- vars/default.yml
|
||||||
|
@ -1,24 +1 @@
|
|||||||
---
|
---
|
||||||
- name: add users
|
|
||||||
user:
|
|
||||||
name: "{{ item.name }}"
|
|
||||||
create_home: true
|
|
||||||
password: "{{ lookup('password', './pass/' + item.name + '_pass length=10 chars=ascii_letters') | password_hash('sha512') }}"
|
|
||||||
update_password: on_create
|
|
||||||
with_items: "{{ users }}"
|
|
||||||
register: returned
|
|
||||||
|
|
||||||
- name: create public_html
|
|
||||||
file:
|
|
||||||
path: "/home/{{ item.name}}/public_html/"
|
|
||||||
owner: "{{ item.name }}"
|
|
||||||
group: www-data
|
|
||||||
state: directory
|
|
||||||
with_items: "{{ users }}"
|
|
||||||
|
|
||||||
- name: Sets Up Index page
|
|
||||||
template:
|
|
||||||
src: "files/index.html.j2"
|
|
||||||
dest: "/home/{{ item.name }}/public_html/index.html"
|
|
||||||
mode: 774
|
|
||||||
with_items: "{{ users }}"
|
|
||||||
|
@ -66,10 +66,9 @@
|
|||||||
- name: Sets Up Index page
|
- name: Sets Up Index page
|
||||||
template:
|
template:
|
||||||
src: "files/index.html.j2"
|
src: "files/index.html.j2"
|
||||||
dest: "/var/www/{{ http_host }}/index.html"
|
dest: "/var/www/{{ http_host }}/info.php"
|
||||||
vars:
|
vars:
|
||||||
item:
|
name: "la SNT"
|
||||||
name: "la SNT"
|
|
||||||
|
|
||||||
- name: Enable userdir
|
- name: Enable userdir
|
||||||
shell: /usr/sbin/a2enmod userdir
|
shell: /usr/sbin/a2enmod userdir
|
||||||
|
@ -1,4 +1 @@
|
|||||||
---
|
---
|
||||||
users:
|
|
||||||
- name: test1
|
|
||||||
- name: test2
|
|
||||||
|
Loading…
Reference in New Issue
Block a user