LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-03-2021, 02:21 AM   #1
lse123
Member
 
Registered: Dec 2008
Posts: 125

Rep: Reputation: 15
ansible: tried over 35 times to edit yaml file(s) but again getting error in the syntax


I tried over 35 times to edit yaml file(s) but again getting error in the syntax:

Ubuntu 20.04.2 / ansible 2.9.6
book: Ubuntu-Linux-Bible 10e exercises page 632 / solutions page 696 - Chapter 28: Automating Apps and Infrastructure
with Ansible

leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ ansible-playbook -vC playbook.yml
Using /etc/ansible/ansible.cfg as config file
ERROR! Syntax Error while loading YAML.
did not find expected '-' indicator

The error appears to be in '/home/leonidas/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible/playbook.yml': line 3, column 1, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Create web server
hosts: localhost
^ here
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ ansible-playbook -vC playbook.yml
Using /etc/ansible/ansible.cfg as config file
ERROR! Syntax Error while loading YAML.
did not find expected '-' indicator

The error appears to be in '/home/leonidas/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible/playbook.yml': line 3, column 1, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Create web server
hosts: localhost
^ here
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ ansible --version
ansible 2.9.6
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/leonidas/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0]
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ ansible-playbook -vC my_playbook4.yaml
Using /etc/ansible/ansible.cfg as config file
ERROR! Syntax Error while loading YAML.
found a tab character that violate indentation

The error appears to be in '/home/leonidas/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible/my_playbook4.yaml': line 6, column 1, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Install Apache
apt:
^ here
There appears to be a tab character at the start of the line.

YAML does not use tabs for formatting. Tabs should be replaced with spaces.

For example:
- name: update tooling
vars:
version: 1.2.3
# ^--- there is a tab there.

Should be written as:
- name: update tooling
vars:
version: 1.2.3
# ^--- all spaces here.
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$




Code:
# my_playbook3.yaml
---
- name: Create web server
  hosts: localhost
  tasks:
    - name: Install Apache
	    apt:
	      name: apache2
	      state: present


# my_playbook2.yaml

---
- name: Create web server
    hosts: local
    remote_user: leonidas
    become_method: sudo
    become: yes
    tasks:
    - name: Install Apache
        apt:
          name: apache2
          state: present


# my_playbook1.yaml
---
- name: Create web server
hosts: localhost
become: yes
become_method: sudo
become_user: root
tasks:
- name: Install Apache
  apt:
    name: apache
    state: present
 
Old 05-03-2021, 03:01 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,406

Rep: Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499
as you can see [your own post] that is not really readable. Would be nice to edit it and use more code tags. Anyway I guess it is a simple indentation error, see: https://docs.ansible.com/ansible/lat...AMLSyntax.html
 
Old 05-03-2021, 03:43 AM   #3
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 2,238

Rep: Reputation: Disabled
Code:
$ yq . playbook.yml
yq: Error running jq: ScannerError: while scanning for the next token
found character '\t' that cannot start any token
  in "playbook.yml", line 7, column 1.
$ cat -A playbook|grep \\^I
^I    apt:$
^I      name: apache2$
^I      state: present$
 
Old 05-03-2021, 03:35 PM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,239

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
Quote:
Originally Posted by lse123 View Post
Code:
    - name: Install Apache
	    apt:
^ here
There appears to be a tab character at the start of the line.

YAML does not use tabs for formatting. Tabs should be replaced with spaces.
Do you need help interpreting this error message?
 
Old 05-06-2021, 02:17 AM   #5
lse123
Member
 
Registered: Dec 2008
Posts: 125

Original Poster
Rep: Reputation: 15
according to:
https://docs.ansible.com/ansible/lat...AMLSyntax.html
"
There’s another small quirk to YAML. All YAML files (regardless of their association with Ansible or not) can optionally begin with --- and end with ... .
"

I inserted to the end of YAML file three dots and proceeded
...

see attachment error... what have to do to proceed???

YAML File:
Code:
---
- name: Create web server
  hosts: localhost
  tasks:
  - name: Install Apache
    apt:
      name: apache2
      state: present
...
Attached Thumbnails
Click image for larger version

Name:	2021-05-06_10-13-45.png
Views:	9
Size:	41.5 KB
ID:	36316  
 
Old 05-06-2021, 02:24 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,406

Rep: Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499Reputation: 5499
Is this a joke?
--- at the beginning and ... at the end are usually not part of the YAML file. Actually ... means something like this: continue like above, and so on ...
But that is allowed in the yaml file as the very first and last line, so that cannot cause any kind of error.

The error you posted is not related to this --- and ... . That is an ssh related error, you need to configure user account to use ssh properly.

Last edited by pan64; 05-06-2021 at 02:29 AM.
 
1 members found this post helpful.
Old 05-06-2021, 02:28 AM   #7
lse123
Member
 
Registered: Dec 2008
Posts: 125

Original Poster
Rep: Reputation: 15
trying do exercises:

1. Install Ansible on your system.
2. Add sudo privileges for the user that you want to use to do these exercises.
3. Create a start to an Ansible playbook (call it my_ playbook.yaml) that includes
the following content:
Code:
---
- name: Create web server
  hosts: localhost
  tasks:
  - name: Install Apache
    apt:
      name: apache2
      state: present
...
4. Run ansible-playbook on the my_playbook.yaml file in check mode to see if
there is a problem completing the playbook (hint: there is).
5. Modify my_ playbook.yaml to escalate privileges so that the tasks are run as the
root user.
6. Run ansible-playbook again until the apache2 package successfully installs
on your system.
 
Old 05-06-2021, 02:33 AM   #8
lse123
Member
 
Registered: Dec 2008
Posts: 125

Original Poster
Rep: Reputation: 15
To install apache via ansible... localhost

how having error:

fatal: [localhost]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.\r\nroot@localhost: Permission denied (publickey,password).", "unreachable": true}

Can get ssh key - localhost???
 
Old 05-06-2021, 06:02 AM   #9
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,239

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
What do you mean by the sentence "Can get ssh key - localhost???" ?

The error message states that leonidas can't log on to localhost. Find out why. I would just run ssh leonidas@localhost to see what happens. Most probably you must add your public key to authorized_keys.

This is not the same question anymore. The title is now misleading. I suggest you don't use this thread for asking other questions.
 
Old 05-06-2021, 10:20 AM   #10
lse123
Member
 
Registered: Dec 2008
Posts: 125

Original Poster
Rep: Reputation: 15
OK
I generate ssh keys for remote servers, what changes for generate ssh keys for localhost/ssh...?
 
Old 05-06-2021, 03:14 PM   #11
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,239

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
You generate keys for remote servers? This is not what I do. I generate a key pair on the ssh client, then copy the public key to the servers I want to log on to.

And nothing changes when the server is localhost. You generate the key and add it to authorized_keys on the ssh server. In this case, the ssh server is the same server as the client, but the workflow is the same.

Last edited by berndbausch; 05-06-2021 at 03:17 PM.
 
Old 05-07-2021, 04:06 PM   #12
lse123
Member
 
Registered: Dec 2008
Posts: 125

Original Poster
Rep: Reputation: 15
you say:
"In this case, the ssh server is the same server as the client, but the workflow is the same."

the same,
if PC local has two users, user1, user2
To ssh localhost, I should connect from user1 ssh to user2 or vice versa...? correct?
 
Old 05-07-2021, 04:47 PM   #13
lse123
Member
 
Registered: Dec 2008
Posts: 125

Original Poster
Rep: Reputation: 15
you must install the sshpass program????
Code:
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ ansible-playbook -v -C my_playbook1.yaml
Using /etc/ansible/ansible.cfg as config file

PLAY [Create web server] ********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "Missing sudo password"}

PLAY RECAP **********************************************************************************************************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ ansible-playbook -v -C -kK my_playbook1.yaml
Using /etc/ansible/ansible.cfg as config file
SSH password: 
BECOME password[defaults to SSH password]: 

PLAY [Create web server] ********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program"}

PLAY RECAP **********************************************************************************************************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$
 
Old 05-07-2021, 05:01 PM   #14
lse123
Member
 
Registered: Dec 2008
Posts: 125

Original Poster
Rep: Reputation: 15
Code:
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ sudo apt install sshpass
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gnome-software-common libappstream-glib8 libgspell-1-2 libgspell-1-common libllvm10 libllvm9
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  sshpass
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 10.5 kB of archives.
After this operation, 30.7 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu focal/universe amd64 sshpass amd64 1.06-1 [10.5 kB]
Fetched 10.5 kB in 1s (7,304 B/s)                      
Selecting previously unselected package sshpass.
(Reading database ... 473101 files and directories currently installed.)
Preparing to unpack .../sshpass_1.06-1_amd64.deb ...
Unpacking sshpass (1.06-1) ...
Setting up sshpass (1.06-1) ...
Processing triggers for man-db (2.9.1-1) ...
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ ansible-playbook -v -C -kK my_playbook1.yaml
Using /etc/ansible/ansible.cfg as config file
SSH password: 
BECOME password[defaults to SSH password]: 

PLAY [Create web server] ********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"setup": {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "deprecations": [{"msg": "Distribution Ubuntu 20.04 on host localhost should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information", "version": "2.12"}], "failed": true, "module_stderr": "Shared connection to localhost closed.\r\n", "module_stdout": "\r\nleonidas2 is not in the sudoers file.  This incident will be reported.\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}}, "msg": "The following modules failed to execute: setup\n"}

PLAY RECAP **********************************************************************************************************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ groups leonidas
leonidas : leonidas adm cdrom sudo audio dip plugdev lpadmin sambashare docker libvirt
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ usermod -aG sudo leonidas2
usermod: Permission denied.
usermod: cannot lock /etc/passwd; try again later.
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ sudo usermod -aG sudo leonidas2
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ groups leonidas2
leonidas2 : leonidas2 sudo
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ ansible-playbook -v -C -kK my_playbook1.yaml
Using /etc/ansible/ansible.cfg as config file
SSH password: 
BECOME password[defaults to SSH password]: 

PLAY [Create web server] ********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************
[DEPRECATION WARNING]: Distribution Ubuntu 20.04 on host localhost should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to 
using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost]

TASK [Install Apache] ***********************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "python-apt must be installed to use check mode. If run normally this module can auto-install it."}

PLAY RECAP **********************************************************************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ sudo apt install python-apt
Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 6660 (unattended-upgr)       
Reading package lists... Done                                                                                       
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gnome-software-common libappstream-glib8 libgspell-1-2 libgspell-1-common libllvm10 libllvm9
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  python-apt-dbg python-apt-doc
The following NEW packages will be installed:
  python-apt
0 upgraded, 1 newly installed, 0 to remove and 44 not upgraded.
Need to get 155 kB of archives.
After this operation, 737 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 python-apt amd64 2.0.0ubuntu0.20.04.4 [155 kB]
Fetched 155 kB in 2s (85.6 kB/s)                       
Selecting previously unselected package python-apt.
(Reading database ... 473106 files and directories currently installed.)
Preparing to unpack .../python-apt_2.0.0ubuntu0.20.04.4_amd64.deb ...
Unpacking python-apt (2.0.0ubuntu0.20.04.4) ...
Setting up python-apt (2.0.0ubuntu0.20.04.4) ...
leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$ ansible-playbook -v -C -kK my_playbook1.yaml
Using /etc/ansible/ansible.cfg as config file
SSH password: 
BECOME password[defaults to SSH password]: 

PLAY [Create web server] ********************************************************************************************************************************************************************************************************

TASK [Gathering Facts] **********************************************************************************************************************************************************************************************************
[DEPRECATION WARNING]: Distribution Ubuntu 20.04 on host localhost should use /usr/bin/python3, but is using /usr/bin/python for backward compatibility with prior Ansible releases. A future Ansible release will default to 
using the discovered platform python for this host. See https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information. This feature will be removed in version 2.12. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost]

TASK [Install Apache] ***********************************************************************************************************************************************************************************************************
changed: [localhost] => {"cache_update_time": 1620424431, "cache_updated": false, "changed": true, "stderr": "", "stderr_lines": [], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following packages were automatically installed and are no longer required:\n  gnome-software-common libappstream-glib8 libgspell-1-2 libgspell-1-common\n  libllvm10 libllvm9\nUse 'sudo apt autoremove' to remove them.\nThe following additional packages will be installed:\n  apache2-bin apache2-data apache2-utils libapr1 libaprutil1\n  libaprutil1-dbd-sqlite3 libaprutil1-ldap\nSuggested packages:\n  apache2-doc apache2-suexec-pristine | apache2-suexec-custom\nThe following NEW packages will be installed:\n  apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1\n  libaprutil1-dbd-sqlite3 libaprutil1-ldap\n0 upgraded, 8 newly installed, 0 to remove and 44 not upgraded.\nInst libapr1 (1.6.5-1ubuntu1 Ubuntu:20.04/focal [amd64])\nInst libaprutil1 (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])\nInst libaprutil1-dbd-sqlite3 (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])\nInst libaprutil1-ldap (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])\nInst apache2-bin (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])\nInst apache2-data (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [all])\nInst apache2-utils (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])\nInst apache2 (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])\nConf libapr1 (1.6.5-1ubuntu1 Ubuntu:20.04/focal [amd64])\nConf libaprutil1 (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])\nConf libaprutil1-dbd-sqlite3 (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])\nConf libaprutil1-ldap (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])\nConf apache2-bin (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])\nConf apache2-data (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [all])\nConf apache2-utils (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])\nConf apache2 (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following packages were automatically installed and are no longer required:", "  gnome-software-common libappstream-glib8 libgspell-1-2 libgspell-1-common", "  libllvm10 libllvm9", "Use 'sudo apt autoremove' to remove them.", "The following additional packages will be installed:", "  apache2-bin apache2-data apache2-utils libapr1 libaprutil1", "  libaprutil1-dbd-sqlite3 libaprutil1-ldap", "Suggested packages:", "  apache2-doc apache2-suexec-pristine | apache2-suexec-custom", "The following NEW packages will be installed:", "  apache2 apache2-bin apache2-data apache2-utils libapr1 libaprutil1", "  libaprutil1-dbd-sqlite3 libaprutil1-ldap", "0 upgraded, 8 newly installed, 0 to remove and 44 not upgraded.", "Inst libapr1 (1.6.5-1ubuntu1 Ubuntu:20.04/focal [amd64])", "Inst libaprutil1 (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])", "Inst libaprutil1-dbd-sqlite3 (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])", "Inst libaprutil1-ldap (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])", "Inst apache2-bin (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])", "Inst apache2-data (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [all])", "Inst apache2-utils (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])", "Inst apache2 (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])", "Conf libapr1 (1.6.5-1ubuntu1 Ubuntu:20.04/focal [amd64])", "Conf libaprutil1 (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])", "Conf libaprutil1-dbd-sqlite3 (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])", "Conf libaprutil1-ldap (1.6.1-4ubuntu2 Ubuntu:20.04/focal [amd64])", "Conf apache2-bin (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])", "Conf apache2-data (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [all])", "Conf apache2-utils (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])", "Conf apache2 (2.4.41-4ubuntu3.1 Ubuntu:20.04/focal-updates, Ubuntu:20.04/focal-security [amd64])"]}

TASK [Check that Apache has started] ********************************************************************************************************************************************************************************************
changed: [localhost] => {"changed": true, "msg": "Service apache2 not found on host, assuming it will exist on full run"}

PLAY RECAP **********************************************************************************************************************************************************************************************************************
localhost                  : ok=3    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

leonidas@ubuntu:~/Documents/Ubuntu-Linux-Bible 10e/ch28-ansible$
 
Old 05-07-2021, 05:03 PM   #15
lse123
Member
 
Registered: Dec 2008
Posts: 125

Original Poster
Rep: Reputation: 15
Success finally installed - via ansible - apache2

SUCCESS FINALLY INSTALLED
VIA ANSIBLE
APACHE2

See attachment
Attached Thumbnails
Click image for larger version

Name:	2021-05-08_00-58-57.jpg
Views:	3
Size:	256.5 KB
ID:	36325  
 
  


Reply

Tags
ansible, ubuntu 20.04


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Understanding YAML for Ansible LXer Syndicated Linux News 0 10-29-2020 11:06 AM
[SOLVED] How to add another song to this YAML file? quickquestion111 Programming 8 05-27-2020 04:29 PM
Error when creating “oc_vol.yaml”: Post https://console.com:8443/api/v1/persistentvolumes: Service Unavailable Epic555 Linux - Containers 0 01-16-2019 06:44 AM
the question about parse yaml file dy20082250 Programming 5 01-26-2018 03:22 AM
[SOLVED] upgrading ruby from 1.9.1 to 1.9.3 and psych yaml error alanware Slackware 2 05-24-2012 02:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration