title: Ansible and Playbook. How to convert shell commands into yaml syntax?
body: <p>I'm a newbie in Ansible and I don't understand how all people easily write shell commands in the Ansible/YAML syntax. May be I've missed a page from the documentation where it is explained well.</p>
  
  <p>For example: What do I need to write in my <code>playbook.yml</code> if I want to perform these commands in my remote machines:</p>
  
  <pre><code>sudo apt-get install software-properties-common
  sudo apt-key adv –recv-keys –keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
  sudo add-apt-repository 'deb http://mariadb.biz.net.id//repo/5.5/ubuntu precise main'
  </code></pre>
  
  <p>I think it would be something like this:</p>
  
  <pre><code>- name: install mariadb
    apt: ...
    sudo: yes
  </code></pre>