From b4ddfd2bb6f1635d11981398565901500dd9e330 Mon Sep 17 00:00:00 2001 From: Dmitry Shulyak Date: Wed, 1 Jul 2015 15:17:23 +0300 Subject: [PATCH] Unify LocalAnsible and Ansible implementations --- resources/ansible_local/actions/run.yaml | 4 ++++ .../actions/test_role/defaults/main.yml | 0 .../actions/test_role/tasks/main.yml | 0 .../{ansible_sample => ansible_local}/meta.yaml | 2 +- resources/ansible_remote/actions/run.yaml | 4 ++++ resources/ansible_remote/meta.yaml | 13 +++++++++++++ resources/ansible_sample/actions/run.yaml | 4 ---- 7 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 resources/ansible_local/actions/run.yaml rename resources/{ansible_sample => ansible_local}/actions/test_role/defaults/main.yml (100%) rename resources/{ansible_sample => ansible_local}/actions/test_role/tasks/main.yml (100%) rename resources/{ansible_sample => ansible_local}/meta.yaml (84%) create mode 100644 resources/ansible_remote/actions/run.yaml create mode 100644 resources/ansible_remote/meta.yaml delete mode 100644 resources/ansible_sample/actions/run.yaml diff --git a/resources/ansible_local/actions/run.yaml b/resources/ansible_local/actions/run.yaml new file mode 100644 index 0000000..ce81d26 --- /dev/null +++ b/resources/ansible_local/actions/run.yaml @@ -0,0 +1,4 @@ +- hosts: '*' + sudo: yes + roles: + - { role: "test_role" } \ No newline at end of file diff --git a/resources/ansible_sample/actions/test_role/defaults/main.yml b/resources/ansible_local/actions/test_role/defaults/main.yml similarity index 100% rename from resources/ansible_sample/actions/test_role/defaults/main.yml rename to resources/ansible_local/actions/test_role/defaults/main.yml diff --git a/resources/ansible_sample/actions/test_role/tasks/main.yml b/resources/ansible_local/actions/test_role/tasks/main.yml similarity index 100% rename from resources/ansible_sample/actions/test_role/tasks/main.yml rename to resources/ansible_local/actions/test_role/tasks/main.yml diff --git a/resources/ansible_sample/meta.yaml b/resources/ansible_local/meta.yaml similarity index 84% rename from resources/ansible_sample/meta.yaml rename to resources/ansible_local/meta.yaml index fba6f9c..77a47f1 100644 --- a/resources/ansible_sample/meta.yaml +++ b/resources/ansible_local/meta.yaml @@ -1,5 +1,5 @@ id: ansible_sample -handler: local_ansible +handler: ansible_playbook version: 0.0.1 input: var1: diff --git a/resources/ansible_remote/actions/run.yaml b/resources/ansible_remote/actions/run.yaml new file mode 100644 index 0000000..5206f49 --- /dev/null +++ b/resources/ansible_remote/actions/run.yaml @@ -0,0 +1,4 @@ +- hosts: '*' + sudo: yes + tasks: + - debug: "my message" \ No newline at end of file diff --git a/resources/ansible_remote/meta.yaml b/resources/ansible_remote/meta.yaml new file mode 100644 index 0000000..626215f --- /dev/null +++ b/resources/ansible_remote/meta.yaml @@ -0,0 +1,13 @@ +id: ansible_sample +handler: ansible_playbook +version: 0.0.1 +input: + ip: + type: str! + value: + ssh_user: + type: str! + value: + ssh_key: + type: str! + value: diff --git a/resources/ansible_sample/actions/run.yaml b/resources/ansible_sample/actions/run.yaml deleted file mode 100644 index fd3e8de..0000000 --- a/resources/ansible_sample/actions/run.yaml +++ /dev/null @@ -1,4 +0,0 @@ -- hosts: localhost - sudo: yes - roles: - - { role: "test_role" } \ No newline at end of file