Q:

Not able to call a shell script from an ansible playbook

I am trying to run two shell scripts in background through ansible playbook.
The playbook is running successfully and the displaying that all the tasks ran successfully.
But these two shell scripts are not running. 
I have checked this with:
ps -ef | grep sh

These two shell scripts are required to run a sage service and I am trying to automate the s
age server configuration using ansible.
Here is how the playbook looks like :
---
- hosts: localhost
  remote_user: root

  tasks:
   - name : update system
     shell : apt-get update

   - name : install dependencies
     shell : apt-get install -y m4 build-essential gcc gfortran libssl-dev

   - name : install python-software-properties
     shell : apt-get install python-software-properties

   - name : add sage ppa repo
     shell : apt-add-repository ppa:aims/sagemath

   - name : update system
     shell : apt-get update

   - name : install dvipng
     shell : apt-get install dvipng

   - name : install sage binary
     shell : apt-get install sagemath-upstream-binary

   - name : run create sage script
     shell : . ./create_sagenb &

   - name : run start sage script
     shell : . ./start_sage &

This is how create_sagenb looks like:
#!/bin/bash
# Creating Sage notebook
screen -S "Sage_Server" sage -c 'notebook(interface="",directory="/root/.sage/sage_notebook.sagenb",port=80,accounts=true)'

This is how start_sage looks:
#!/bin/bash
# Creating Sage notebook
address=$(hostname --ip-address)
screen -S "Sage_Server" sage -c "notebook(interface=" "'$address'" ",port=80,accounts=true)"

A:

This is how I successfully invoke screen sessions in Ansible:
- name: Invoke script
  command: /usr/bin/screen -d -m sudo -u myuser /usr/local/bin/myuser.sh -i -y

This starts a screen session in detached mode (-d and -m combined), which I then use sudo to switch to a specific user to run my script as.

