create roles for richard user and home.xai-corp.net

This commit is contained in:
2015-09-19 16:49:12 -04:00
parent 8ddae69caf
commit c639e5dc4b
20 changed files with 251 additions and 0 deletions

8
home.xai-corp.net.yml Normal file
View File

@@ -0,0 +1,8 @@
---
# playbook to install django test on home.xai-corp.net
- hosts: home
remote_user: root
roles:
- home.xai-corp.net

View File

@@ -0,0 +1,4 @@
---
- name: test connection
ping:

View File

@@ -0,0 +1,4 @@
---
# defaults/main.yml
# define default variable values here

View File

@@ -0,0 +1,9 @@
---
# handlers/main.yml
# define handlers here
#- name: restart <service>
# service: name=<service> state=restarted
#- name: stop <service>
# service: name=<service> state=stopped

View File

@@ -0,0 +1,8 @@
---
# meta/main.yml
# define dependancies here
# dependencies:
# - { role: geerlingguy.java }
dependencies: []

View File

@@ -0,0 +1,17 @@
---
# tasks/main.yml
# define tasks here
- name: install composer
shell: curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
- name: install nodejs and npm
apt: pkg={{ item }} state=installed
with_items:
- nodejs
- nodejs-legacy
- npm
- name: install grunt globaly
npm: name="grunt-cli" global=yes

View File

@@ -0,0 +1,10 @@
---
# vars/_extravars.yml
# define extra variable values here
# this file should be loaded via an include_vars statement in the task.
# often this is used for managing differences in os.
# Variable setup.
#- name: Include OS-Specific variables
# include_vars: "{{ ansible_os_family }}.yml"

View File

@@ -0,0 +1,4 @@
---
# defaults/main.yml
# define default variable values here

View File

@@ -0,0 +1,9 @@
---
# handlers/main.yml
# define handlers here
#- name: restart <service>
# service: name=<service> state=restarted
#- name: stop <service>
# service: name=<service> state=stopped

View File

@@ -0,0 +1,10 @@
---
# meta/main.yml
# define dependancies here
# dependencies:
# - { role: geerlingguy.java }
dependencies:
- _ping
- user-richard

View File

@@ -0,0 +1,3 @@
---
# tasks/main.yml
# define tasks here

View File

@@ -0,0 +1,10 @@
---
# vars/_extravars.yml
# define extra variable values here
# this file should be loaded via an include_vars statement in the task.
# often this is used for managing differences in os.
# Variable setup.
#- name: Include OS-Specific variables
# include_vars: "{{ ansible_os_family }}.yml"

View File

@@ -7,6 +7,7 @@
apt: pkg={{ item }} state=installed apt: pkg={{ item }} state=installed
with_items: with_items:
- php5-fpm - php5-fpm
- php5-curl
# phalcon # phalcon
- apt_repository: repo='ppa:phalcon/stable' state=present - apt_repository: repo='ppa:phalcon/stable' state=present

View File

@@ -0,0 +1,8 @@
---
# defaults/main.yml
# define default variable values here
user:
name: richard
group: richard
home: /home/richard/

View File

@@ -0,0 +1,9 @@
---
# handlers/main.yml
# define handlers here
#- name: restart <service>
# service: name=<service> state=restarted
#- name: stop <service>
# service: name=<service> state=stopped

View File

@@ -0,0 +1,8 @@
---
# meta/main.yml
# define dependancies here
# dependencies:
# - { role: geerlingguy.java }
dependencies: []

View File

@@ -0,0 +1,6 @@
---
# tasks/main.yml
# define tasks here
- name: copy .procmailrc
template: src=procmailrc.j2 dest={{ user.home }}/.procmailrc owner={{ user.name }} group={{ user.group }} mode=0640

View File

@@ -0,0 +1,112 @@
# .procmailrc
# routes incoming mail to appropriate mailboxes
PATH=/usr/bin:/usr/local/bin
MAILDIR=$HOME/Maildir/
PMDIR=$MAILDIR
LOGFILE=/var/log/procmail.log
VERBOSE=yes
LOGABSTRACT=no
SHELL=/bin/sh
DROPPRIVS=yes
DELIVER=/usr/libexec/dovecot/deliver
# --------------------------------------------------
# TEST
#:0:
#* ^Subject.*test
#| $DELIVER -m Systems
# --------------------------------------------------
# Family and Friends
:0:
* ^(From|Cc).*ellen.morgan@talk21.com
* ^(From|Cc).*tessier_vero@hotmail.com
* ^(From|Cc).*richard@xai-corp.net
| $DELIVER -m Family
# --------------------------------------------------
# Musicians
:0:
* ^(From|Cc).*m.a.berube@hotmail.com
| $DELIVER -m Music
# --------------------------------------------------
# Reverb Nation
:0:
* ^(From|Cc|To).*updates@reverbnation.com
| $DELIVER -m Notifications
:0:
* ^(From|Cc|To).*noreply@reverbnation.com
| $DELIVER -m Publicity
# --------------------------------------------------
# Code Project
:0:
* ^(From|Cc|To).*maillist.codeproject.com
* ^(Subject).*(Offers)
| $DELIVER -m Publicity
:0:
* ^(From|Cc|To).*maillist.codeproject.com
| $DELIVER -m Newsletters
# --------------------------------------------------
# Social Media Notifications
:0:
* ^(From|Cc).*@facebookmail.com
| $DELIVER -m Notifications
:0:
* ^(From|Cc).*@twitter.com
| $DELIVER -m Notifications
# --------------------------------------------------
# Newsletters
:0:
* ^(From|Cc).*(dzone|messages4|folkalley|info.docker|accuradio).com
| $DELIVER -m Newsletters
:0:
* ^From.*news@linkedin.com
| $DELIVER -m Newsletters
:0:
* ^From.*news@linkedin.com
| $DELIVER -m Newsletters
# --------------------------------------------------
# Paypal receipts
:0:
* ^From.*intl.paypal.com
| $DELIVER -m Paypal
# --------------------------------------------------
# Publicity
:0:
* ^From.*e.paypal.com
| $DELIVER -m Publicity
:0:
* ^From.*@codeanywhere.net
| $DELIVER -m Publicity
:0:
* ^From.*Google(\+| Analytics| AdSense)
| $DELIVER -m Publicity
:0:
* ^From.*Netflix
| $DELIVER -m Publicity
# --------------------------------------------------
# --------------------------------------------------
# Default Inbox
:0 w
| $DELIVER

View File

@@ -0,0 +1,10 @@
---
# vars/_extravars.yml
# define extra variable values here
# this file should be loaded via an include_vars statement in the task.
# often this is used for managing differences in os.
# Variable setup.
#- name: Include OS-Specific variables
# include_vars: "{{ ansible_os_family }}.yml"

View File

@@ -10,6 +10,7 @@
roles: roles:
- jenkins - jenkins
- devtools
- { - {
role: website, role: website,
server_hostname: "htmlgames.xai-corp.net", server_hostname: "htmlgames.xai-corp.net",