1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

497 commits

Author SHA1 Message Date
Michael DeHaan
60d64251f8 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.
2012-07-14 19:49:42 -04:00
Michael DeHaan
64c51ade1e 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).
2012-07-14 19:18:33 -04:00
Michael DeHaan
028f216689 Error handling and magic around with_items, to let you know when variables are usable inside it and when not. 2012-07-14 13:23:14 -04:00
Michael DeHaan
102b22be1f 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.
2012-07-14 13:12:19 -04:00
Michael DeHaan
15b2b3a020 Warn if something loaded by vars_files is not a dictionary 2012-07-14 12:39:06 -04:00
Michael DeHaan
279b5965b8 Much streamlining around setup steps in playbooks, now only run setup once per play. 2012-07-14 12:24:19 -04:00
Michael DeHaan
931f9f1a61 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.
2012-07-14 11:59:12 -04:00
Michael DeHaan
60f295f7a0 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 649963ca2c2610b97a90d2449132a57ae6b39ec9
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 7f9718f185ec991bc165c4a52b2468cf41f4c349
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 eb63b9e899318ce0c26902ca73af50135a6224e4
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 aa13d233078b825a8057bebf35ed478342cf4e43
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 264ebaa77c4243f2e9117e8d1168dc2f2eed7ee2
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 7db49a8048e78402c4c9a0a6cb2604689280fbbb
Author: Dag Wieërs <dag@wieers.com>
Date:   Thu Jul 12 16:46:53 2012 +0200

    Might as well fix this too

commit f36c6c8c5b419865939c7e2b0b26f6c97255fdc8
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 a96f6813522c5ae8b2be4514a2de56a775c6b7b0
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 ]
    ----
2012-07-12 01:29:51 -04:00
Michael DeHaan
611e5b0c90 Make adding tags to a playbook work as shorthand to tagging all tasks in the play. 2012-07-12 00:58:48 -04:00
Michael DeHaan
cf313cde96 Soft import of paramiko since we have the SSH and local connection types now. Packaging will still
require it.
2012-07-12 00:43:51 -04:00
Michael DeHaan
a765deccce Allow top level playbook files to import other playbook files, added some basic
playbook structure checking.
2012-07-12 00:19:44 -04:00
Dag Wieërs
cb40778b84 Wrong evaluation of a local file before fetching the remote file 2012-07-13 11:07:32 +02:00
Timothy Appnel
84fa9dcaee The default private key file was getting set incorrectly from environment variables. My bad. 2012-07-12 13:30:30 -04:00
Ingo Gottwald
26aa4e2469 Enabled cowsay support for Ubuntu 2012-07-12 11:14:15 +02:00
Michael DeHaan
dc4ebab345 Merge pull request #576 from davehatton/adjust_playbook_output_formating
improve output formating for playbook
2012-07-11 17:42:39 -07:00
Michael DeHaan
969c3feb13 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!
2012-07-11 20:33:46 -04:00
Michael DeHaan
83f23ef861 Basic support for tagging tasks and selecting a subset of tasks to run with --tags. 2012-07-11 19:51:26 -04:00
Dave Hatton
7ecdb83800 improve output formating for playbook 2012-07-11 09:35:10 +01:00
John Kleint
375a1eaf43 Use iterative MD5 hashing. 2012-07-09 13:27:47 -04:00
Dave Hatton
55694db7c3 switch to hashlib.md5 or md5 instead of OS md5 commands 2012-07-09 08:52:00 +01:00
Michael DeHaan
0d28466b22 When sudo'ing to root, keep the setup file location as /etc/ansible/setup 2012-07-07 09:29:03 -04:00
Michael DeHaan
c2b8fabf66 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.
2012-07-07 09:10:18 -04:00
Michael DeHaan
8220d57690 Clean up md5 functions + make the fetch module stay happy if the remote file does not exist. 2012-07-07 08:47:32 -04:00
Michael DeHaan
b551eba6d4 Comment uncommented methods in utils 2012-07-07 08:47:32 -04:00
Michael DeHaan
a490213d45 Release bump to start development on 0.6 2012-07-04 18:07:19 -04:00
Michael DeHaan
e3aba7770f Merge pull request #518 from brainpage/devel
adds 'groups' variable, essentially making hosts file accessible as a var
2012-07-04 11:28:46 -07:00
Daniel Hokka Zakrisson
9882dd56f6 Allow variables in variables in templates 2012-07-03 16:42:00 +02:00
alex
f72b1f4fd7 Fixed: pathname for tmp 2012-07-02 22:04:56 +02:00
alex
bbf2939063 Fixed: executing templates outside playbooks 2012-07-02 21:34:11 +02:00
Jonathan Palley
cedbcfcc0a adds 'groups' variable, essentially making hosts file accessible as a variable 2012-07-01 15:04:53 +08:00
Michael DeHaan
a5dd280149 Fix up the output of the raw module when run within /usr/bin/ansible 2012-06-29 18:48:37 -04:00
Michael DeHaan
efac68b636 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.
2012-06-19 21:57:43 -04:00
Jeroen Hoekx
d592e15dcc Correctly add ungrouped hosts to 'ungrouped' in YAML inventory. 2012-06-27 08:26:01 +02:00
Michael DeHaan
afb2e3e5ac Merge pull request #511 from dsummersl/devel
added ability to ovverride all ssh settings via ANSIBLE_SSH_ARGS
2012-06-26 15:28:49 -07:00
Dane Summers
37fce9c0f6 added ability to ovverride all ssh settings via ANSIBLE_SSH_ARGS 2012-06-26 14:59:42 -04:00
Michael DeHaan
8468e2255b Merge pull request #507 from jhoekx/convention-library-path
Add ./library to module search path.
2012-06-25 12:20:56 -07:00
Jeroen Hoekx
879ddddf6f Add ./library to module search path.
It allows for custom modules in the best practices directory structure.
Bundling custom modules along with playbooks in packages is useful.
2012-06-25 21:08:43 +02:00
Jeroen Hoekx
6c92d2fa88 Import ansible errors in Poller. 2012-06-25 20:48:35 +02:00
Michael DeHaan
618924a24f Merge pull request #497 from davehatton/change_constants
shouldn't need a (slash) before /home/daveh
2012-06-22 12:01:15 -07:00
Dave Hatton
d42df3a82e change to STDOUT from PIPE to get ssh connection module working 2012-06-22 12:37:23 +01:00
Dave Hatton
d28bbe14ed shouldn't need a (slash) before /home/daveh 2012-06-21 15:37:43 +01:00
Dave Hatton
30d4f070a1 change STDOUT to PIPE to get ssh connection module working 2012-06-21 11:01:08 +01:00
Daniel Hokka Zakrisson
fa887bc90f Merge stdout and stderr for non-sudo 2012-06-20 20:49:52 +02:00
Daniel Hokka Zakrisson
7884bc02ea Wait for process to finish and then parse output 2012-06-20 20:49:52 +02:00
Seth Vidal
dca75033fe add -q to handle stdout/stderr being combined, add catch for ControlPersist not existing in ssh for rhel6, etc 2012-06-20 14:06:24 -04:00
Michael DeHaan
9662902c31 Merge pull request #492 from dhozac/unnecessary-parse_json
Remove unnecessary parse_json invocation
2012-06-20 10:26:17 -07:00
Michael DeHaan
071978a2e7 Merge pull request #493 from dhozac/ssh-merge-stdouterr
Merge stdout and stderr as that is what is expected
2012-06-20 10:24:32 -07:00
Daniel Hokka Zakrisson
f5ecd075f7 Remove unnecessary parse_json invocation 2012-06-20 14:54:36 +02:00
Michael DeHaan
bd653c8f3c Merge pull request #488 from dhozac/jinja2-env
Create a Jinja2 environment allowing includes
2012-06-19 13:09:02 -07:00
Michael DeHaan
e0f12292d8 Merge pull request #489 from dhozac/ssh-args-default
Default to using a ControlMaster connection
2012-06-19 13:01:09 -07:00