Clean tasks files

This commit is contained in:
Alexandre Iooss 2019-02-19 10:49:18 +01:00
parent d4a187e449
commit 98622807e1
7 changed files with 16 additions and 15 deletions

View file

@ -3,8 +3,8 @@
- name: Configure NodeJS pin
when: ansible_distribution == 'Debian' and ansible_distribution_release == 'stretch'
template:
src: 'apt/nodejs.j2'
dest: '/etc/apt/preferences.d/nodejs'
src: apt/nodejs.j2
dest: /etc/apt/preferences.d/nodejs
mode: 0644
# Install EtherPad dependencies

View file

@ -11,7 +11,7 @@
user:
name: etherpad
group: etherpad
home: '/var/local/etherpad'
home: /var/local/etherpad
comment: EtherPad
system: yes
state: present
@ -19,7 +19,7 @@
# Security #3
- name: Secure Etherpad home directory
file:
path: '/var/local/etherpad'
path: /var/local/etherpad
state: directory
owner: etherpad
group: etherpad

View file

@ -8,8 +8,8 @@
# Download EtherPad
- name: Clone EtherPad project
git:
repo: 'https://github.com/ether/etherpad-lite.git'
dest: '/var/local/etherpad/etherpad-lite'
repo: https://github.com/ether/etherpad-lite.git
dest: /var/local/etherpad/etherpad-lite
version: master
become: true
become_user: etherpad
@ -19,14 +19,14 @@
- name: Install Etherpad dependencies
command: bin/installDeps.sh
args:
chdir: '/var/local/etherpad/etherpad-lite'
chdir: /var/local/etherpad/etherpad-lite
become: true
become_user: etherpad
# Configuration
- name: Configure EtherPad
lineinfile:
dest: '/var/local/etherpad/etherpad-lite/settings.json'
dest: /var/local/etherpad/etherpad-lite/settings.json
regexp: '^\s*"{{ item.key }}"'
line: "{{ item.value }}"
with_dict:
@ -38,8 +38,8 @@
# Service file
- name: Install EtherPad systemd unit
template:
src: 'systemd/etherpad-lite.service.j2'
dest: '/etc/systemd/system/etherpad-lite.service'
src: systemd/etherpad-lite.service.j2
dest: /etc/systemd/system/etherpad-lite.service
owner: root
group: root
mode: 0644

View file

@ -13,5 +13,5 @@
name: nscd
state: restarted
ignore_errors: true # Sometimes service do not exist
listen: 'Restart nslcd service'
listen: Restart nslcd service

View file

@ -24,7 +24,7 @@
src: nslcd.conf.j2
dest: /etc/nslcd.conf
mode: 0600
notify: 'Restart nslcd service'
notify: Restart nslcd service
# Configure /etc/nsswitch.conf
- name: Configure NSS to use LDAP
@ -37,5 +37,5 @@
group: 'group: files ldap'
shadow: 'shadow: files ldap'
sudoers: 'sudoers: files ldap'
notify: 'Restart nslcd service'
notify: Restart nslcd service

View file

@ -19,7 +19,9 @@
# Downtime!
- name: Stop LDAP server
service: name=slapd state=stopped
service:
name: slapd
state: stopped
# Cry a bit
- name: Remove old data

View file

@ -3,7 +3,6 @@
- name: Install NGINX server
apt:
name: nginx
state: present
update_cache: yes
# Install sites