---
# This is a post deployment playbook to be run if needed to confugire 
deployed cluster further.
#
#         elasticluster setup mycluster -- /path/to/this/playbook.yml

- name: Mount volume on head node
  tags:
    - after
    - local
  # change this with `gridengine_master` if you're using GridEngine
  # instead of SLURM
  hosts: slurm_master, slurm_worker

  vars:
    # mount point for the filesystem
    mountpoint: '/data'
  tasks:
    - name: Ensure mountpoint directory exists
      file:
        dest: '{{ mountpoint }}'
        state: directory

Additionally, I am able to run the task independently of the elasticluster 
environment:

ansible-playbook --private-key=/home/tuhuhuh/.ssh/id_rsa 
elasticluster/share/playbooks/customisations/debug.yml 
--inventory=/home/tuhuhuh/.elasticluster/storage/slurm-clean.inventory 
--become --become-user=root


Would the error be related to the fact that both main.yml and custom 
playbooks are passed through in the elasticluster triggered run?



On Wednesday, March 17, 2021 at 6:20:33 PM UTC Tomasz Skowron wrote:

> Hi,
>
> I am in the process of developing application specific playbook to further 
> customise deployed cluster manually.
>
> According to the example playbook, below should be sufficient to run:
>
> # This playbook should be run *after* ElastiCluster has set up the
> # cluster, for instance using::
> #
> #         elasticluster setup mycluster -- /path/to/this/playbook.yml
>
> however an example dummy playbook fails to run. Part of the verbose output 
> below.
>
> 2021-03-17 18:16:45 2711fe1b9a20 elasticluster[1] DEBUG Running Ansible 
> command `ansible-playbook --private-key=/home/tuhuhuh/.ssh/id_rsa 
> /home/elasticluster/share/playbooks/main.yml 
> --inventory=/home/tuhuhuh/.elasticluster/storage/slurm-clean.inventory 
> --become --become-user=root -vv 
> /home/elasticluster/share/playbooks/customisations/debug.yml -e 
> @extra_vars.yml` ...
> usage: ansible-playbook [-h] [--version] [-v] [-k]
>                         [--private-key PRIVATE_KEY_FILE] [-u REMOTE_USER]
>                         [-c CONNECTION] [-T TIMEOUT]
>                         [--ssh-common-args SSH_COMMON_ARGS]
> ....
>
>  2021-03-17 18:16:45 2711fe1b9a20 elasticluster[1] ERROR Command 
> `ansible-playbook --private-key=/home/tuhuhuh/.ssh/id_rsa 
> /home/elasticluster/share/playbooks/main.yml 
> --inventory=/home/tuhuhuh/.elasticluster/storage/slurm-clean.inventory 
> --become --become-user=root -vv 
> /home/elasticluster/share/playbooks/customisations/debug.yml -e 
> @extra_vars.yml` failed with exit code 2.
>
> setup command succeeds to redeploy if no custom playbook is specified.
>
> debug.yml contains:
>
> - name: Mount volume on head node
>   tags:
>     - after
>     - local
>   # change this with `gridengine_master` if you're using GridEngine
>   # instead of SLURM
>   hosts: slurm_master
>
>   vars:
>     # mount point for the filesystem
>     mountpoint: '/data'
>     - name: Ensure mountpoint directory exists
>       file:
>         dest: '{{ mountpoint }}'
>         state: directory
>
> am I missing anything important here?
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticluster" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticluster/45c6a8be-92c3-4461-a908-91cc574541d4n%40googlegroups.com.

Reply via email to