fubarhouse / ansible-role-pm2 Goto Github PK
View Code? Open in Web Editor NEWProvision a virtual machine with node applications managed by PM2 using Ansible.
License: MIT License
Provision a virtual machine with node applications managed by PM2 using Ansible.
License: MIT License
Geerlingguy's ubuntu docker images for 12.04 and 16.04 do not feature curl in their repository.
Having a look around at ansible roles for curl, there are none that build from source.
The only possible solution beyond using other docker images would be to create a solution for those that want to build curl from source so we can do the same.
Finally figured out how to get NPM to install exactly where I tell it to, so I'm looking at fixes.
Initial tests are working perfectly unlike last night, and I'm intending to add a variable to control custom installation directories.
About time I fix this properly, considering I have far more experience now.
So I'm constantly fighting with this Ansible NPM module...
I've added commit b9c810f to achieve the following:
I can't say why the Ansible NPM module isn't consistent with me, but having the second install if the program doesn't exist after the first install task basically guarentee's I won't need to look at this again. Perhaps one day we won't need to do this... But, it's not today.
Tests are now passing for that commit, so I'll create another release - should be the last one for a time.
Already done, a nice to have. Now there'll be two tasks, one to ensure the database exists if users want to run initialization scripts or use another means of populating data as I have been, and one to simply import a database in the nodejs repository only when required.
The data structure has changed, in that the object is now structured as such:
database:
name: myApp
file: data/database.sql
Testing is to come, before release.
Having getting my hands dirty with node more, I'm seeing a relationship between node and ruby.
I'm going to add my ruby role as a dependency optionally and install some gems using the command/raw task simply because the ansible gem task is essentially broken from experience...
My reasoning is more specific to being able to execute node-compass applications without error, as ruby gems are used in this process server side.
I think the module File needs the directive path as required, here
path: {{ item.location }}
Correct?
failed: [] (item={u'port': 3000, u'start': u'app/bin/www', u'location': u'/opt/app', u'repository': u'myRepo', u'name': u'app'}) => {
"changed": false,
"invocation": {
"module_args": {
"follow": true,
"force": false,
"recurse": true,
"state": "directory"
}
},
"item": {
"location": "/opt/app",
"name": "app",
"port": 3000,
"repository": "myRepo",
"start": "app/bin/www"
},
"msg": "missing required arguments: path"
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.