--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7dbc2826-d974-414b-b5a9-e22dc3fff0c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Matt,ThanksI now used this commandansible-playbook -u dokuwa1 --ask-pass --become playbook/apache.ymli get another error messagefatal: [192.168.85.129]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to 192.168.85.129 closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "rc": 1}[WARNING]: Could not create retry file '/etc/ansible/playbook/apache.retry'.[Errno 13] Permission denied: u'/etc/ansible/playbook/apache.retry'Is there anything i am doing wrongDaley
Sent: Thursday, 1 June 2017, 19:28
Subject: Re: [ansible-project] error when installing apache on ubuntu
--become-method does not imply that ansible should actually "become"You will also need to add `--become`
On Thu, Jun 1, 2017 at 1:16 PM 'Daley Okuwa' via Ansible Project <ansible-project@googlegroups.com> wrote:
--This is my playbook apache.yml---- hosts: alltasks:- name: install apache2apt: name=apache2 state=present update_cache=yesThis is my command including specifying suansible-playbook -u dokuwa1 --ask-pass --become-method=su --ask-su-pass playbook/apache.ymlerror messagefatal: [192.168.85.129]: FAILED! => {"changed": false, "cmd": "apt-get update", "failed": true, "msg": "W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)\nE: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)\nE: Unable to lock directory /var/lib/apt/lists/\nW: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)\nW: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)\nE: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)\nE: Unable to lock the administration directory (/var/lib/dpkg/), are you root?", "rc": 100, "stderr": "W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)\nE: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)\nE: Unable to lock directory /var/lib/apt/lists/\nW: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)\nW: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCachesThis is obvious a permission issue of sudo
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7dbc2826-d974-414b-b5a9-e22dc3fff0c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
----
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v-DLu-jKuW6YPabR%3Doto%2BkPbr9_FOgyM2pfNQSFn-56UQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/436988991.1205471.1496343552387%40mail.yahoo.com.
Matt,ThanksI now used this commandansible-playbook -u dokuwa1 --ask-pass --become playbook/apache.ymli get another error message
fatal: [192.168.85.129]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to 192.168.85.129 closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE", "rc": 1}
[WARNING]: Could not create retry file '/etc/ansible/playbook/apache. retry'.
[Errno 13] Permission denied: u'/etc/ansible/playbook/ apache.retry'Is there anything i am doing wrongDaley
From: Matt Martz <ma...@sivel.net>
To: ansible-project@googlegroups. com
Sent: Thursday, 1 June 2017, 19:28
Subject: Re: [ansible-project] error when installing apache on ubuntu
--become-method does not imply that ansible should actually "become"You will also need to add `--become`
On Thu, Jun 1, 2017 at 1:16 PM 'Daley Okuwa' via Ansible Project <ansible-project@googlegroups. com> wrote:
This is my playbook apache.yml---- hosts: alltasks:- name: install apache2apt: name=apache2 state=present update_cache=yesThis is my command including specifying suansible-playbook -u dokuwa1 --ask-pass --become-method=su --ask-su-pass playbook/apache.ymlerror message
fatal: [192.168.85.129]: FAILED! => {"changed": false, "cmd": "apt-get update", "failed": true, "msg": "W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)\nE: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)\nE: Unable to lock directory /var/lib/apt/lists/\nW: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)\nW: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)\nE: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)\nE: Unable to lock the administration directory (/var/lib/dpkg/), are you root?", "rc": 100, "stderr": "W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)\nE: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)\nE: Unable to lock directory /var/lib/apt/lists/\nW: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)\nW: Problem unlinking the file /var/cache/apt/ srcpkgcache.bin - RemoveCaches
This is obvious a permission issue of sudo
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@ googlegroups.com.
To post to this group, send email to ansible-project@googlegroups. com.
To view this discussion on the web visit https://groups.google.com/d/ msgid/ansible-project/ 7dbc2826-d974-414b-b5a9- e22dc3fff0c4%40googlegroups. com.
For more options, visit https://groups.google.com/d/ optout.
----
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@ googlegroups.com.
To post to this group, send email to ansible-project@googlegroups. com.
To view this discussion on the web visit https://groups.google.com/d/ msgid/ansible-project/CAD8N0v- DLu-jKuW6YPabR%3Doto%2BkPbr9_ FOgyM2pfNQSFn-56UQ%40mail. gmail.com.
For more options, visit https://groups.google.com/d/ optout.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@ googlegroups.com.
To post to this group, send email to ansible-project@googlegroups. com.
To view this discussion on the web visit https://groups.google.com/d/ msgid/ansible-project/ 436988991.1205471. 1496343552387%40mail.yahoo.com .
[DEPRECATION WARNING]: DEFAULT_SUDO_USER option, In favor of Ansible Become, which is a generic framework.
See become_user. , use become instead. This feature will be removed in version 2.8. Deprecation warnings can
be disabled by setting deprecation_warnings=False in ansible.cfg.
PLAY [client] ***********************************************************************************************
TASK [Gathering Facts] **************************************************************************************
fatal: [x.x.x.x]: FAILED! => {"changed": false, "module_stderr": "Shared connection to x.x.x.x closed.\r\n", "module_stdout": "sudo: a password is required\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
to retry, use: --limit @/home/ansible/playbooks/apache.retry
PLAY RECAP **************************************************************************************************
x.x.x.x : ok=0 changed=0 unreachable=0 failed=1
--- # Plyabook Apache install on client
- hosts: client
user: ansible
become: yes
become_method: sudo
connection: ssh
gather_facts: yes
tasks:
- name: install apache on client machine
yum:
name: apache2
state: present
update_cache: yes
Sent: Thursday, 1 June 2017, 19:28
Subject: Re: [ansible-project] error when installing apache on ubuntu
--become-method does not imply that ansible should actually "become"You will also need to add `--become`
On Thu, Jun 1, 2017 at 1:16 PM 'Daley Okuwa' via Ansible Project <ansible...@googlegroups. com> wrote:
--This is my playbook apache.yml---- hosts: alltasks:- name: install apache2apt: name=apache2 state=present update_cache=yesThis is my command including specifying suansible-playbook -u dokuwa1 --ask-pass --become-method=su --ask-su-pass playbook/apache.ymlerror messagefatal: [192.168.85.129]: FAILED! => {"changed": false, "cmd": "apt-get update", "failed": true, "msg": "W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)\nE: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)\nE: Unable to lock directory /var/lib/apt/lists/\nW: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)\nW: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)\nE: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)\nE: Unable to lock the administration directory (/var/lib/dpkg/), are you root?", "rc": 100, "stderr": "W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)\nE: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)\nE: Unable to lock directory /var/lib/apt/lists/\nW: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)\nW: Problem unlinking the file /var/cache/apt/ srcpkgcache.bin - RemoveCachesThis is obvious a permission issue of sudo
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@ googlegroups.com.
To post to this group, send email to ansible...@googlegroups. com.
To view this discussion on the web visit https://groups.google.com/d/ msgid/ansible-project/ 7dbc2826-d974-414b-b5a9- e22dc3fff0c4%40googlegroups. com.
For more options, visit https://groups.google.com/d/ optout.
----
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@ googlegroups.com.
To post to this group, send email to ansible...@googlegroups. com.
To view this discussion on the web visit https://groups.google.com/d/ msgid/ansible-project/CAD8N0v- DLu-jKuW6YPabR%3Doto%2BkPbr9_ FOgyM2pfNQSFn-56UQ%40mail. gmail.com.
For more options, visit https://groups.google.com/d/ optout.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@ googlegroups.com.
To post to this group, send email to ansible...@googlegroups. com.
To view this discussion on the web visit https://groups.google.com/d/ msgid/ansible-project/ 436988991.1205471. 1496343552387%40mail.yahoo.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2dcb4ec1-c193-4dea-8896-39aacc21ce88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAPiXTetc4t5Gdui9h57HED6O0rDY%2BR3dFZ5bv2MSU5%2BnGPECNQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAG9tf-9cdaTQ67RSqv60KEdwbOm%3D9a%3D0OmE-yj5s%3DXX%3DLH7u7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
<10.138.0.7> ESTABLISH SSH CONNECTION FOR USER: None
<10.138.0.7> 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/ansible/.ansible/cp/4a2f76bb9f 10.138.0.7 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.138.0.7> (0, '/home/ansible\n', '')
<10.138.0.7> ESTABLISH SSH CONNECTION FOR USER: None
<10.138.0.7> 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/ansible/.ansible/cp/4a2f76bb9f 10.138.0.7 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/ansible/.ansible/tmp/ansible-tmp-1543279730.75-165337335093430 `" && echo ansible-tmp-1543279730.75-165337335093430="` echo /home/ansible/.ansible/tmp/ansible-tmp-1543279730.75-165337335093430 `" ) && sleep 0'"'"''
<10.138.0.7> (0, 'ansible-tmp-1543279730.75-165337335093430=/home/ansible/.ansible/tmp/ansible-tmp-1543279730.75-165337335093430\n', '')
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/system/setup.py
<10.138.0.7> PUT /home/ansible/.ansible/tmp/ansible-local-2063N2QcuU/tmpCbzUzB TO /home/ansible/.ansible/tmp/ansible-tmp-1543279730.75-165337335093430/AnsiballZ_setup.py
<10.138.0.7> SSH: EXEC sftp -b - -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/ansible/.ansible/cp/4a2f76bb9f '[10.138.0.7]'
<10.138.0.7> (0, 'sftp> put /home/ansible/.ansible/tmp/ansible-local-2063N2QcuU/tmpCbzUzB /home/ansible/.ansible/tmp/ansible-tmp-1543279730.75-165337335093430/AnsiballZ_setup.py\n', '')
<10.138.0.7> ESTABLISH SSH CONNECTION FOR USER: None
<10.138.0.7> 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/ansible/.ansible/cp/4a2f76bb9f 10.138.0.7 '/bin/sh -c '"'"'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1543279730.75-165337335093430/ /home/ansible/.ansible/tmp/ansible-tmp-1543279730.75-165337335093430/AnsiballZ_setup.py && sleep 0'"'"''
<10.138.0.7> (0, '', '')
<10.138.0.7> ESTABLISH SSH CONNECTION FOR USER: None
<10.138.0.7> 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/ansible/.ansible/cp/4a2f76bb9f -tt 10.138.0.7 '/bin/sh -c '"'"'sudo -H -S -p "[sudo via ansible, key=fdpjpnhuuvzahtoagmnqvudarudpmuyd] password: " -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-fdpjpnhuuvzahtoagmnqvudarudpmuyd; /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1543279730.75-165337335093430/AnsiballZ_setup.py'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<10.138.0.7> (1, '\r\nansible is not in the sudoers file. This incident will be reported.\r\n', 'Shared connection to 10.138.0.7 closed.\r\n')
<10.138.0.7> ESTABLISH SSH CONNECTION FOR USER: None
<10.138.0.7> 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/ansible/.ansible/cp/4a2f76bb9f 10.138.0.7 '/bin/sh -c '"'"'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1543279730.75-165337335093430/ > /dev/null 2>&1 && sleep 0'"'"''
<10.138.0.7> (0, '', '')
fatal: [10.138.0.7]: FAILED! => {
"changed": false,
"module_stderr": "Shared connection to 10.138.0.7 closed.\r\n",
"module_stdout": "\r\nansible 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
}
to retry, use: --limit @/home/ansible/playbooks/apache.retry
PLAY RECAP **************************************************************************************************
10.138.0.7 : ok=0 changed=0 unreachable=0 failed=1
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAPiXTevJ_vmJ9E613_Qufa%2B-MEJ7WK%3DDpKSGs_cg6jUzxhLL%2Bg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAG9tf--1rnZeYZy8hyUE5jR%2BqUJAP-av36qBTcH1%3D0dEhbrSAg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.