Ansible - Create your first playbook

Поділитися
Вставка
  • Опубліковано 19 січ 2025

КОМЕНТАРІ • 20

  • @aritra1414
    @aritra1414 3 роки тому +1

    Cool. Enjoying the step by step processes. I wish you taught it as a full length course and in more deeper level.

  • @mwandamwanda6105
    @mwandamwanda6105 3 роки тому +2

    hi could you have a look at template creation , seems video recording skips past it

    • @DevOpsJourney
      @DevOpsJourney  3 роки тому +1

      I'm so sorry about that. This video is more up to date and includes chapters. You might be able to find an exmplanation in here: ua-cam.com/video/tpDXmm7aPAE/v-deo.html

    • @bgable7707
      @bgable7707 2 роки тому

      @@DevOpsJourney Yes, I noticed, that the creation of the index.html.j2 file and the playbook reference to it
      is still missing

  • @simplyviki
    @simplyviki 4 роки тому +1

    Just subscribed, I have a question, for a project that is working on containers using ECS and infra using Terraform, do you think Ansible will come into play ? because for configuration we'll mostly use docker prebaked images or prebaked AMIs for servers or put instructions in dockerfile to configure the image, As I am learning the relevant tools, wanted to know if I would spend time learning Ansible or learn other things?

    • @DevOpsJourney
      @DevOpsJourney  4 роки тому +1

      I think if you are using prebaked AMIs and docker images you probably wont need much ansible. However it may be good to update and maintain the AMIs using it. It all really depends.
      Learning more in depth docker or even kubernetes might be a good idea!

    • @simplyviki
      @simplyviki 4 роки тому

      @@DevOpsJourney Thanks for your feedback

  • @ankitbillore8221
    @ankitbillore8221 2 роки тому +1

    why we use -K as option ,
    -a is for arguments right .??

    • @DevOpsJourney
      @DevOpsJourney  2 роки тому +1

      I believe -K is no longer needed and you can just specify the playbook name. If you type ansible-playbook --help you should get a list of all the arguments and what they do

    • @ankitbillore8221
      @ankitbillore8221 2 роки тому

      @@DevOpsJourney thanks

  • @George-mk7lp
    @George-mk7lp 2 роки тому +1

    great tutorial

  • @1972LaVita
    @1972LaVita 4 роки тому

    More Details:
    TASK [write a basic index.html file] *************************************************************************************************************************task path: /vagrant/lab_magr/playbook1.yml:20
    ESTABLISH SSH CONNECTION FOR USER: None
    SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/b18e077b1c web01 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
    (0, '/home/vagrant
    ', '')
    ESTABLISH SSH CONNECTION FOR USER: None
    SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/b18e077b1c web01 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/vagrant/.ansible/tmp/ansible-tmp-1603215995.09-15216949092251 `" && echo ansible-tmp-1603215995.09-15216949092251="` echo /home/vagrant/.ansible/tmp/ansible-tmp-1603215995.09-15216949092251 `" ) && sleep 0'"'"''
    ESTABLISH SSH CONNECTION FOR USER: None
    SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/1d44756646 web02 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
    (0, 'ansible-tmp-1603215995.09-15216949092251=/home/vagrant/.ansible/tmp/ansible-tmp-1603215995.09-15216949092251
    ', '')
    (0, '/home/vagrant
    ', '')
    ESTABLISH SSH CONNECTION FOR USER: None
    SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/1d44756646 web02 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/vagrant/.ansible/tmp/ansible-tmp-1603215995.15-246446437899939 `" && echo ansible-tmp-1603215995.15-246446437899939="` echo /home/vagrant/.ansible/tmp/ansible-tmp-1603215995.15-246446437899939 `" ) && sleep 0'"'"''
    (0, 'ansible-tmp-1603215995.15-246446437899939=/home/vagrant/.ansible/tmp/ansible-tmp-1603215995.15-246446437899939
    ', '')
    ESTABLISH SSH CONNECTION FOR USER: None
    SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/b18e077b1c web01 '/bin/sh -c '"'"'rm -f -r /home/vagrant/.ansible/tmp/ansible-tmp-1603215995.09-15216949092251/ > /dev/null 2>&1 && sleep 0'"'"''
    ESTABLISH SSH CONNECTION FOR USER: None
    SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/1d44756646 web02 '/bin/sh -c '"'"'rm -f -r /home/vagrant/.ansible/tmp/ansible-tmp-1603215995.15-246446437899939/ > /dev/null 2>&1 && sleep 0'"'"''
    (0, '', '')
    fatal: [web01]: FAILED! => {
    "changed": false,
    "msg": "AnsibleUndefinedVariable: 'myenvironment' is undefined"
    }
    (0, '', '')
    fatal: [web02]: FAILED! => {
    "changed": false,
    "msg": "AnsibleUndefinedVariable: 'myenvironment' is undefined"
    }
    to retry, use: --limit @/vagrant/lab_magr/playbook1.retry
    PLAY RECAP ***************************************************************************************************************************************************web01 : ok=3 changed=0 unreachable=0 failed=1
    web02 : ok=3 changed=0 unreachable=0 failed=1

  • @76739
    @76739 2 роки тому

    Спасибо

  • @isaacmaag1294
    @isaacmaag1294 3 роки тому

    Not a good tutorial. Use the command line only next time because a lot of people aren't going to understand or know how to set up/use visual studio.