Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to addess issues #19 #23 #24 #25

Merged
merged 4 commits into from
Feb 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ smtp_port: 25

admin_first_name: Admin
admin_last_name: Admin
admin_user_name: admin
admin_email: [email protected]
admin_password: bar

Expand Down
40 changes: 25 additions & 15 deletions snipeit.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
---
- hosts: snipeit
- hosts: snipeit
sudo: true

vars:

snipeit_source: /opt/snipe-it

snipeit_version: master
snipeit_dbname: snipeit
snipeit_dbuser: snipeit
snipeit_dbuser_password: secret

smtp_host: smtp.example.com
smtp_host: []
smtp_port: 25

admin_first_name: Admin
admin_last_name: Admin
admin_email: [email protected]
admin_password: bar
admin_email: "{{ lookup('env', 'GIT_AUTHOR_EMAIL') }}"
admin_user_name: "{{ lookup('env', 'USERNAME') }}"

disable_default_apache_site: True
run_mysql_on_all_interfaces: False

# If you want to import users from Active Directory to Snipe-IT, uncomment and modify the below values.
# To import AD users, run /usr/local/bin/import_ad_users.py

#ldap_uri: 'ldap://dc01.foo.com'
#ldap_admin: 'CN=Administrator,DC=foo,DC=com'
#ldap_passwd: 'your_secret_password'
#users_ou: 'OU=Users,DC=foo,DC=com'
run_mysql_on_all_interfaces: True
# If you want to import users from Active Directory to Snipe-IT, change ldap: to true and modify the below values.
# To import AD users, run /usr/local/bin/import_ad_users.py
ldap: false
ldap_uri: []
ldap_admin: 'CN=Administrator,DC=foo,DC=com'
ldap_passwd: 'your_secret_password'
users_ou: 'OU=Users,DC=foo,DC=com'

vars_prompt:

- name: "snipeit_dbuser_password"
prompt: "Enter snipeit_dbuser_password"
default: "changeme"
private: yes

- name: "admin_password"
prompt: "Enter admin_password"
default: "changeme"
private: yes

roles:
- snipeit-ansible
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@

- name: Install AD Users Import script
include: import_ad_users.yml
when: ldap_uri is defined
when: ldap
10 changes: 5 additions & 5 deletions templates/artisan_expect.exp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ spawn php artisan app:install

expect "Please enter your first name:" {send "{{ admin_first_name }}\r"}
expect "Please enter your last name:" {send "{{ admin_last_name }}\r"}
expect "Please enter your user email:" {send "{{ admin_email }}\r"}
expect "Please enter your username:" {send "{{ admin_user_name }}\r"}
expect "Please enter your email:" {send "{{ admin_email }}\r"}
expect "Please enter your user password (at least 8 characters):" {send "{{ admin_password }}\r"}
expect "Do you want to seed your database with dummy data? (deafult is yes):" {send "yes\r"}
expect "Do you really wish to run this command?" {send "yes\r"}
expect "Do you really wish to run this command?" {send "yes\r"}
expect "Please confirm your user password:" {send "{{ admin_password }}\r"}
expect "Do you want to seed your database with dummy data? y/N (default is no):" {send "y\r"}

expect eof
expect eof