Commit Graph

515 Commits (32b6879fdff9da3193f2a326fe7457a3bcd2d52b)

Author SHA1 Message Date
Dave Hatton eafbf6f46d format fixes to make fetch more usable 14 years ago
Michael DeHaan 94ae897e00 Fix import in ssh connection 14 years ago
Michael DeHaan 7c14797e35 with_items handling code should apply to all modules, was screwed up in refactoring to only apply to 'normal'
modules.
14 years ago
Michael DeHaan d1a03f4d4c Misc code cleanup, mostly whitespace preferences, removing unused imports, plus a few fixes here and there. 14 years ago
Michael DeHaan 7b9006934a misc code cleanup, don't pass parameters to the connection object we can already get from Runner 14 years ago
Michael DeHaan c7e657ab0c misc code cleanup 14 years ago
Michael DeHaan fabded984d minor code cleanup 14 years ago
Michael DeHaan c6c07a2526 misc code cleanup 14 years ago
Michael DeHaan 76461d4900 No need to feed variables into the setup module for preservation since the file is no longer saved to disk. 14 years ago
Michael DeHaan e3b07f4619 Misc cleanup/formatting 14 years ago
Michael DeHaan a7edc2b906 consolidate output code in callbacks.py, from utils, remove extra functions 14 years ago
Michael DeHaan 43d9060da0 add space between function 14 years ago
Michael DeHaan 0489b10949 removed unused function 14 years ago
Michael DeHaan 15d30869cb Indentation cleanup (partial) 14 years ago
Michael DeHaan f18bb88de0 No longer need to calculate setup metadata location since we don't write
the setup file to disk.
14 years ago
Michael DeHaan 6d5fa210d7 with_items should be processed inside the task class, also make first_available_file
and with_items incompatible.  Most cases that would need this could be solved
with vars_files.
14 years ago
Michael DeHaan 82c524ccf1 Misc cleanup -- moved function out of utils, removed debug statement. 14 years ago
Michael DeHaan 6d03748c22 Clean up imports in utils, add nicer recursion depth limit check. 14 years ago
Michael DeHaan 83794549fc Allow gather_facts: False in a playbook as a way of disabling the fact step if you know
you aren't going to need it.
14 years ago
Michael DeHaan a180af2f29 Change the way we do with_items to make them happen next to each other in runner, which eliminates the problem of with_items and vars_files sometimes not playing nice with each other.
(Also a fix for the user module error handling when the user
is not present at the time of the return.  This can only really be caused by multiple ansible executions).
14 years ago
Michael DeHaan e754ea11ac Error handling and magic around with_items, to let you know when variables are usable inside it and when not. 14 years ago
Michael DeHaan 02a5337bf3 Make the logic behind vars_files smarter, so host specific vars go into the setup cache, but other variables
are usable top level.  This allows vars_files data to be used, most of the time, just fine in with_items,
(error handling pending) but is mostly a memory and efficiency thing.
14 years ago
Michael DeHaan 69a676dc2d Warn if something loaded by vars_files is not a dictionary 14 years ago
Michael DeHaan 3f3c117cd6 Much streamlining around setup steps in playbooks, now only run setup once per play. 14 years ago
Michael DeHaan 0d5089c2a3 Setup module no longer saves to disk, as templates are mostly useful in playbooks and this allows lots of simplifications
around file pathing and removes occasional permissions conflicts depending on how things are used.
14 years ago
Michael DeHaan 264983e89f Squashed commit of the following:
commit 4430ce3eefcdff0b0ceffea0ef66ea8e876a807d
Merge: 631783b 649963c
Author: Michael DeHaan <michael.dehaan@gmail.com>
Date:   Thu Jul 12 01:28:43 2012 -0400

    Merge branch 'host-groups' of https://github.com/dagwieers/ansible into daggroups

commit 649963ca2c
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 23:01:00 2012 +0200

    Added comments in the example yaml file as requested

commit 7f9718f185
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 22:49:38 2012 +0200

    Add the default nose color too, to test specific overrides

commit eb63b9e899
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 22:44:35 2012 +0200

    Introduce comics and cartoons to test yaml groups defined on a per-node basis

commit aa13d23307
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 19:33:15 2012 +0200

    A small fix to revert to old state

commit 264ebaa77c
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 19:31:51 2012 +0200

    Combine both yaml unit tests into one example file

commit 7db49a8048
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 16:46:53 2012 +0200

    Might as well fix this too

commit f36c6c8c5b
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 16:42:00 2012 +0200

    Added unit tests for host-groups patch

    For the unit test I chose to keep the original yaml file in place as a reference.

    This patch also includes a fix.

commit a96f681352
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 12:30:43 2012 +0200

    Allow groups to be defined on a per-host basis

    This makes it possible to define on a per-host basis what groups a host is in.
    When managing a large set of systems it makes it easier to ensure each of the
    systems is defined in a set of groups (e.g. production/qa/development,
    linux/solaris/aix) rather than having to add systems to multiple disconnected
    groups.

    ----
      - host: system01

      - host: system02

      - host: system03

      - group: linux
        hosts:
        - system01
        - system02

      - group: solaris
        hosts:
        - system03

      - group: production
        hosts:
        - system01
        - system03

      - group: qa
        - system02

      - group: dbserver
        hosts:
        - system01

      - group: ntpserver
        hosts:
        - system02

      - group: webserver
        - system03
    ----

    Can be redefined as:

    ----
      - host: system01
        groups: [ linux, production, dbserver ]

      - host: system02
        groups: [ linux, qa, ntpserver ]

      - host: system03
        groups: [ solaris, production, webserver ]
    ----
14 years ago
Michael DeHaan 7e8e134b6a Make adding tags to a playbook work as shorthand to tagging all tasks in the play. 14 years ago
Michael DeHaan ebc7663ccf Soft import of paramiko since we have the SSH and local connection types now. Packaging will still
require it.
14 years ago
Michael DeHaan 997fc08555 Allow top level playbook files to import other playbook files, added some basic
playbook structure checking.
14 years ago
Dag Wieërs f0d6e82cd0 Wrong evaluation of a local file before fetching the remote file 14 years ago
Timothy Appnel e96e141d0e The default private key file was getting set incorrectly from environment variables. My bad. 14 years ago
Ingo Gottwald 8d94b30ce3 Enabled cowsay support for Ubuntu 14 years ago
Michael DeHaan b5f496fc8b Merge pull request #576 from davehatton/adjust_playbook_output_formating
improve output formating for playbook
14 years ago
Michael DeHaan 4d7cc0797e Allow include statements from plays to specify tags (see tags.yml example file).
Also be smart and don't run a play at all if no tasks in the play match any of the tags specified.  This includes not running the setup actions!
14 years ago
Michael DeHaan f6f77e7ac1 Basic support for tagging tasks and selecting a subset of tasks to run with --tags. 14 years ago
Dave Hatton 5f26f86f94 improve output formating for playbook 14 years ago
John Kleint 07ef38e447 Use iterative MD5 hashing. 14 years ago
Dave Hatton 87e83be826 switch to hashlib.md5 or md5 instead of OS md5 commands 14 years ago
Michael DeHaan 79e47f53dd When sudo'ing to root, keep the setup file location as /etc/ansible/setup 14 years ago
Michael DeHaan d8999800d1 Take a remote md5sum before a file transfer to decide whether to transfer the file or not.
Allows for efficient transfer of large files.  Templates do not sample first because they are small.
14 years ago
Michael DeHaan ceae1857b6 Clean up md5 functions + make the fetch module stay happy if the remote file does not exist. 14 years ago
Michael DeHaan dc95385b38 Comment uncommented methods in utils 14 years ago
Michael DeHaan 5c239effca Release bump to start development on 0.6 14 years ago
Michael DeHaan fb0abbe800 Merge pull request #518 from brainpage/devel
adds 'groups' variable, essentially making hosts file accessible as a var
14 years ago
Daniel Hokka Zakrisson aba1fe8731 Allow variables in variables in templates 14 years ago
alex d3b2b2f6f7 Fixed: pathname for tmp 14 years ago
alex fa1c0e3ceb Fixed: executing templates outside playbooks 14 years ago
Jonathan Palley e827782f81 adds 'groups' variable, essentially making hosts file accessible as a variable 14 years ago
Michael DeHaan 5f1c7c8e24 Fix up the output of the raw module when run within /usr/bin/ansible 14 years ago
Michael DeHaan 81adae619a Remove the -D module debug flag, which no longer is functional due to sudo pty requirements, and replace with -v/--verbose.
This flag will show playbook output from non-failing commands.  -v is also added to /usr/bin/ansible, but not  yet used.

I also gutted some internals code dealing with 'invocations' which allowed the callback to know what module invoked
it.  This is not something 0.5 does or needed, so callbacks have been simplified.
14 years ago