$ ansible --version
ansible 2.9.6
config file = ~/repos/ansible/ansible.cfg
configured module search path = ['~/.ansible/plugins/modules',
'/usr/share/ansible/plugins/modules']
ansible python module location =
~/.local/lib/python3.7/site-packages/ansible
executable location = ~/.local/bin/ansible
python version = 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0]
Here is the playbook:
---
- hosts: vpn
become: yes
become_method: sudo
become_user: root
roles:
- vpn-alpine
Here is the relevant part of my role:
- name: Activate awall rules
awall:
activate: yes
tags: awall-activate
$ ansible-playbook -vvvv -t awall-activate -K playbooks/openvpn.yml
TASK [vpn-alpine : Activate awall rules]
***************************************************************************************************************************************************
task path: ~/repos/ansible/roles/vpn-alpine/tasks/awall.yml:85
Wednesday 25 March 2020 09:43:30 -0600 (0:00:02.577) 0:00:02.653
*******
Using module file
~/.local/lib/python3.7/site-packages/ansible/modules/system/awall.py
Pipelining is enabled.
<192.168.XXX.XXX> ESTABLISH SSH CONNECTION FOR USER: None
<192.168.XXX.XXX> SSH: EXEC ssh -vvv -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=~/.ansible/cp/fbbc1c5955 192.168.XXX.XXX '/bin/sh -c '"'"'sudo
-H -S -p "[sudo via ansible, key=XXXXXXXXXXXXXXXXXXXXXXX] password:" -u
root /bin/sh -c '"'"'"'"'"'"'"'"'echo
BECOME-SUCCESS-XXXXXXXXXXXXXXXXXXXXXXX ; /usr/bin/python3'"'"'"'"'"'"'"'"'
&& sleep 0'"'"''
Escalation succeeded
On Tuesday, March 24, 2020 at 11:31:11 PM UTC-6, Dick Visser wrote:
>
> Thanks for using ansible. To answer your question more information is
> needed.
>
>
> - Which commands did you run, and what actual output did you get (copied
> as plain text - not as screenshots, images, or other binary attachments).
>
> - What do the relevant inventory/tasks/playbooks/code/variables look like.
>
> - The output of ‘ansible --version’
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/d30405a9-c8d8-4517-bcd7-342b4bfd251b%40googlegroups.com.