1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00
Commit graph

18 commits

Author SHA1 Message Date
Lee Hambley
a236b7f8ef Improve selection of primary host for a role.
Prior to this commit the "primary" server in each role was considered to be
the first one defined. This commit extends the behaviour of primary selection
to look to see if any of the hosts have the `primary` property set to a truthy
value.

In case that more than one server has a truthy `primary` property the first
one is taken as previously.

In order to set the primary property the extended `server()` syntax (that is
not `role()`) must be used, see b56206e.
2013-05-28 12:20:35 +02:00
Lee Hambley
8276aeeaac Format for module style 2013-05-28 12:15:18 +02:00
Lee Hambley
b56206e9ce Implement extended server syntax.
This syntax allows servers to be specified long-hand including properties.

The `role(:my_role, %w{example.com, example.org})` is convenient for batch
set-up of servers; but as SSHKit provides arbirtary properties on servers, it
might be handy to set up servers in long hand:

    server('example.com', roles: :my_role, my_property: "my_value")
    server('example.com', roles: [:my_role, :another], my_property: "my_value")
    server('example.com', roles: :my_role, primary: true)

This commit adds the ability to do this.
2013-05-28 12:10:21 +02:00
seenmyfate
a5d80aa3aa Correct matching of servers when adding new roles 2013-05-24 10:51:20 +01:00
seenmyfate
f18c2265a4 cleaing up server changes 2013-04-30 19:04:52 +01:00
seenmyfate
286f94c29b fix failing spec following change from Roles to Servers 2013-04-28 19:06:19 +01:00
seenmyfate
fe10a84418 Allow each server to have a set of roles
This closes issue #429
2013-04-28 19:00:52 +01:00
seenmyfate
033bf8ee49 set defaults in a single place, call as part of setup task 2013-03-22 11:25:26 +00:00
seenmyfate
a3acea451b add uncommitted specs 2013-03-22 10:40:37 +00:00
seenmyfate
fe00aa856a refactor linked file/directories dsl 2013-03-19 09:48:09 +00:00
seenmyfate
e55dbd70e1 clean up, prefer roles :all over all_roles 2013-03-17 18:19:46 +00:00
seenmyfate
21f24f244a allow set to take a proc 2013-03-15 13:51:06 +00:00
seenmyfate
8c1ede50cd Support ask
As an alternative to `set`, `ask` takes a key and a default value. When
the key is called with `fetch` the user will be prompted to set the
value.
2013-03-15 11:35:49 +00:00
seenmyfate
454f46b829 better encapsulate configuration, support current format 2013-03-10 20:44:50 +00:00
seenmyfate
5e4fe624b5 reduce dsl, prefer fetch/set 2013-03-03 16:27:33 +00:00
seenmyfate
725c47d35b reduce dsl, prefer fetch/set 2013-03-03 16:18:48 +00:00
seenmyfate
de6367af4e Add default tasks, handle configuration 2013-02-01 17:19:00 +00:00
seenmyfate
687526930a installation - running cap install capifies app 2013-02-01 14:51:50 +00:00