Seth Vidal
f41fb90d78
fix the get_hosts() error in get_groups returning a dict not a list of group objects
2012-05-07 18:09:57 -04:00
Peter Sankauskas
6a4e8d7f4c
Code was adding '-a' even when the user was already in the desired groups causing usermod to fail since there was no '-G' option. This is duplicate code (3 lines) from the 'group' section, so could be improved, but it works.
2012-05-07 11:35:45 -07:00
Cosmin Luță
472395bd77
Prevent facter stderr messages from confusing ansible
2012-05-07 18:08:50 +03:00
Michael DeHaan
d6e56dee87
Update development changelog.
2012-05-06 18:34:07 -04:00
Michael DeHaan
66ba6b023c
Update manpage to mention -U (--sudo-user).
2012-05-06 18:32:43 -04:00
Michael DeHaan
4694c3fbba
Fixup the previous sudo_user support patch to work with playbooks.
2012-05-06 18:24:45 -04:00
Jim Richardson
a1ed9fc546
sudo -u works now. Needs testing and maybe a bit of cleanup
2012-05-06 18:24:45 -04:00
Jim Richardson
abcfdbeeaf
first bit of getting sudo -u functionality
2012-05-06 18:24:45 -04:00
Jim Richardson
4d623d0356
sudo -u works now. Needs testing and maybe a bit of cleanup
2012-05-06 18:24:44 -04:00
Jim Richardson
98dda72be1
first bit of getting sudo -u functionality
2012-05-06 18:24:44 -04:00
Michael DeHaan
cbbd9d8f3a
Merge pull request #316 from skvidal/devel
...
fix up service module to make it start processes that are listed to be
2012-05-06 16:43:20 -07:00
Michael DeHaan
85a04a2517
Add missing file
2012-05-06 18:02:53 -04:00
Michael DeHaan
a7b9bf958d
Add tests for new advanced inventory features (groups of groups, group variables) in the default INI format file.
2012-05-06 18:01:11 -04:00
Michael DeHaan
46c661b3e3
Further work on making the YAML inventory parser use the new inventory objects.
2012-05-06 17:03:17 -04:00
Michael DeHaan
c804752835
Fix playbooks such that they work with external inventory scripts. We really want to find out why the 'all'
...
group isn't available, but group vars don't make sense for external inventory anyway.
2012-05-06 15:00:17 -04:00
Michael DeHaan
3fb2d38514
Reinstate external inventory script support this time using the new more OO-ey inventory system.
...
Next up: YAML format.
2012-05-06 14:47:05 -04:00
Michael DeHaan
d9bec842ef
missing files
2012-05-05 16:37:28 -04:00
Michael DeHaan
4011d15faa
Refactored inventory to make it object oriented, need to make YAML format and executable script
...
format compatible with this still, and add some tests for INI-style groups of groups
and variables.
2012-05-05 16:31:03 -04:00
Michael DeHaan
958832fb1f
Log last execution of ansible-pull to /var/log/ansible-pull.log
...
TODO: logrotate script and append to log instead.
2012-05-05 12:18:04 -04:00
Michael DeHaan
23c6a0985c
Update devel branch version in RPM spec.
2012-05-05 12:16:19 -04:00
Seth Vidal
2c416b8f06
fix up service module to make it start processes that are listed to be
...
running and to report errors from starting them
2012-05-04 01:20:51 -04:00
Michael DeHaan
81b8190fc5
Include files are no longer to be considered Jinja2 templates, but individual THINGS
...
in included files can still be templated just like top level playbooks. Resolves
some issues about statements being evaluated before facts were available
2012-05-02 00:28:19 -04:00
Michael DeHaan
aec8995fd9
Change defaults so people have to make conscious decisions about pull setup.
2012-05-01 23:25:19 -04:00
Michael DeHaan
00ea71d8de
Add some comments to ansible-pull and the example playbook
2012-05-01 23:22:23 -04:00
Michael DeHaan
6be85f4fc5
Merge branch 'local' of https://github.com/sfromm/ansible into devel
2012-05-01 23:06:50 -04:00
Stephen Fromm
84c9caa805
Simplify ansible-pull to just invoke ansible and ansible-playbook
...
This eliminates the creation of runner and playbook instances and just
invokes the processes ansible and ansible-playbook.
2012-05-02 09:51:19 -07:00
Stephen Fromm
23ff967f38
Copy inventory file to client
2012-05-02 09:51:19 -07:00
Stephen Fromm
672794f586
Add ansible-pull
...
A first stab at a pull-based model for ansible. This does two things:
1. Invoke the git module via Runner to set up a git repository on the
localhost. It sets up Runner to use transport='local' and forces
the inventory to just 'localhost'.
2. Run any playbooks provided. By default, this wants to run the
playbook local.yml. This also sets transport='local' and sets
the host_list to a list: localhost, fqdn, and hostname.
The reason for setting the host_list and not using override_hosts is
because there may be plays in the playbook that are not meant for a
specific host. That is, if the git repository is for the entire site
and not host-specific, you don't want to override hosts and apply all
plays to any given host. This has the downside of potentially running a
play three times if the play is defined for 'hosts: all'.
2012-05-02 09:51:19 -07:00
Stephen Fromm
3803b27f6c
Add playbook and template to set up ansible-pull
...
Playbook will install ansible, create directory where git checkout goes,
and set up a cron job to run ansible-pull.
2012-05-02 09:51:19 -07:00
Michael DeHaan
df61a65344
Merge pull request #294 from jhoekx/inventory-hostname
...
Define 'inventory_hostname' variable for hosts.
2012-05-02 04:37:45 -07:00
Michael DeHaan
fe90650311
Merge pull request #295 from jhoekx/user-existing-groups
...
Group order in user module should not matter.
2012-05-02 04:36:47 -07:00
Jeroen Hoekx
2c8fbdbd20
Group order in user module should not matter.
...
Groups are not necessarily returned in the defined order, especially when the user already existed before ansible started managing the system.
2012-05-02 11:54:27 +02:00
Jeroen Hoekx
03541baba7
Define 'inventory_hostname' variable for hosts.
2012-05-02 09:56:58 +02:00
Michael DeHaan
bcd713a9f3
changelog update
2012-05-01 23:05:40 -04:00
Michael DeHaan
8ec60e0b4e
update development changelog
2012-05-01 23:03:00 -04:00
Michael DeHaan
3eb00ec1e7
Merge branch 'devel' of https://github.com/skvidal/ansible into skvidal-devel
2012-05-01 22:58:47 -04:00
Seth Vidal
38ea61054f
if a playbook has no vars - still include the global vars
2012-05-03 15:52:02 -04:00
Seth Vidal
dc35dd99c0
inventory group 'all' variables are global variables
...
applied to every host and available all over
they are read in so that ones defined first can be used to define
the later ones.
2012-05-02 18:30:58 -04:00
Rafal Lewczuk
2b7828e118
Fix: file module does not remove dangling symlinks
2012-05-01 22:56:37 -04:00
Rafal Lewczuk
192c0c641c
Trivial fix: make PyDev happy (imports).
2012-05-01 22:56:21 -04:00
Michael DeHaan
12873b9bb6
Merge pull request #303 from jkleint/devel
...
Remove command timeout.
2012-05-03 15:45:40 -07:00
Michael DeHaan
d6bbf288cd
Merge pull request #306 from leucos/devel
...
Adds support for Ubuntu style update-rc.d
2012-05-03 05:37:11 -07:00
Michel Blanc
fc61141ebf
Fixes _find_binaries not using globals
...
_find_binaries now sets the right globals
Binaries are now properly populated (reverse path/binary for loops)
2012-05-03 12:36:06 +02:00
Michel Blanc
572868c9e1
Adds support for Ubuntu style update-rc.d
...
Checks if update-rc.d (Ubuntu) or chkconfig (RHEL) should be used.
Adds basic bin path search for those binaries
Adds 'enable' and 'disable' options for 'enable' command since it's the
arguments that update-rc.d uses (this might be somewhat confusing to
have a command line with 'enable=enable', but probably mkes sense for
Ubuntu users).
Allows use of mixed case for 'list' and 'state' commands.
2012-05-03 08:34:36 +02:00
Michael DeHaan
9ad4e7d149
Merge pull request #300 from sfromm/git
...
Updates for git module
2012-05-02 19:57:50 -07:00
Michael DeHaan
5fe677645d
Merge pull request #302 from sfromm/selinux
...
Set default selinux context with '_default'
2012-05-02 19:56:33 -07:00
Michael DeHaan
52efc90326
Merge pull request #299 from pas256/patch-1
...
test-module arguments file location
2012-05-02 17:58:01 -07:00
John Kleint
cbbaee8a9f
Remove command timeout.
2012-05-02 16:25:04 -04:00
Stephen Fromm
f1b7149fcf
Update how to set default selinux context for file
...
This removes the 'context' option and replaces it with checks for
'_default' value for seuser, serole, setype, or (maybe) selevel.
If '_default' is provided *and* there is a default context for the given
file, this will set the file context to the available default.
2012-05-02 11:38:44 -07:00
Stephen Fromm
887d293a3b
Add git reset --hard support to git module
...
Resets working tree to what is in HEAD and discards any
uncommitted changes.
2012-05-02 09:50:36 -07:00