Initialized the ansible role with command line call.
Role fails with this error:
tasks/main.yml
# Configure MySQL 5.6 repos for Xenial and above.
- include: mysql_repos.yml
- inlcude: folder_check.yml
- inlcude: flyway_git.yml
- include: flyway.yml
example of one of the tasks i made that is included above:
---
#- name: Clone a private repository into /git in the ubuntu home folder.
- git:
repo: "{{ item }}"
version: master
dest: {{ git_folder_location }}
accept_hostkey: yes
# ssh-agent doesn't allow key to pass through remote sudo commands.
become: no
with_items:
- {{ git_repos }}
#TODO: add logic for the env.sh.template copy and value changes
#- name: Set Environment variables from each repo
#TODO: Setup a wait/check for flyway to be installed
#TODO: Next execute setup under db_migrations/
#- name: DB migrations execute setup
#TODO: run migrations
#- name: Check setup.sh for migrations
- stat: path={{ git_folder_location }}/db_migrations/bin/setup.sh
register: setup_sh
#- name: Check migrate.sh for migrations
- stat: path={{ git_folder_location }}/db_migrations/bin/migrate.sh
register: migrate_sh
#- name: Run setup for migrations
- shell: bash {{ git_folder_location }}/db_migrations/bin/setup.sh
when: setup_sh.stat.exists and setup_sh.stat.executable
#- name: Run migrate for migrations
- shell: bash {{ git_folder_location }}/db_migrations/bin/migrate.sh
when: migrate_sh.stat.exists and migrate_sh.stat.executable
Another sample task file:
folder_check.yml
---
- name: "Creating multiple by checking folders"
tasks:
- block:
- name: "Checking folders"
stat:
path: "{{item}}"
register: folder_stats
with_items:
- {{ git_folder_location }}
- name: "Creating multiple folders without disturbing previous
permissions"
file:
path: "{{item.item}}"
state: directory
mode: 0755
group: {{ git_folder_group }}
owner: {{ git_folder_owner }}
when: item.stat.exists == false
with_items:
- "{{folder_stats.results}}"
Error:
ERROR! no action detected in task. This often indicates a misspelled module
name, or incorrect module path
What is wrong with the task(s)?
PS
If more info is needed please let me know....
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/0cb0aaa0-58e7-47a0-ae97-bd2ca041301e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.