Comments (7)
Do you run the role as root? Can you try Debian 8 using the vagrant file in this repo?
from ansible-sudoers.
The playbook has become: yes
so it runs as root via sudo.
I don't use vagrant for this project, I've got it all setup using ansible.
from ansible-sudoers.
Can you add the playbook you're using, so I can test?
from ansible-sudoers.
Sure:
---
### install worker server
- name: install and configure worker servers
hosts: worker
become: yes
roles:
- { role: tersmitten.sudoers }
There are more roles after the sudoers, but the problem occurs while running the sudoers role and the playbook fails before it reaches the following roles.
I enter a sudo password when I call the ansible-playbook and I'm not using rsa key for authentication.
Thank you for looking into this :)
from ansible-sudoers.
I don't see the problem in Debian 8, using the vagrant playbook in this role:
# vagrant up --provision debian-84
Bringing machine 'debian-84' up with 'virtualbox' provider...
==> debian-84: Importing base box 'opscode-debian-8.4'...
==> debian-84: Matching MAC address for NAT networking...
==> debian-84: Setting the name of the VM: sudoers_debian-84_1467713382181_41427
==> debian-84: Fixed port collision for 22 => 2222. Now on port 2200.
==> debian-84: Clearing any previously set network interfaces...
==> debian-84: Preparing network interfaces based on configuration...
debian-84: Adapter 1: nat
debian-84: Adapter 2: hostonly
==> debian-84: Forwarding ports...
debian-84: 22 (guest) => 2200 (host) (adapter 1)
==> debian-84: Running 'pre-boot' VM customizations...
==> debian-84: Booting VM...
==> debian-84: Waiting for machine to boot. This may take a few minutes...
debian-84: SSH address: 127.0.0.1:2200
debian-84: SSH username: vagrant
debian-84: SSH auth method: private key
debian-84:
debian-84: Vagrant insecure key detected. Vagrant will automatically replace
debian-84: this with a newly generated keypair for better security.
debian-84:
debian-84: Inserting generated public key within guest...
debian-84: Removing insecure key from the guest if it's present...
debian-84: Key inserted! Disconnecting and reconnecting using new SSH key...
==> debian-84: Machine booted and ready!
==> debian-84: Checking for guest additions in VM...
==> debian-84: Setting hostname...
==> debian-84: Configuring and enabling network interfaces...
==> debian-84: Mounting shared folders...
debian-84: /vagrant => /home/mtersmitten/Documents/checkouts/Oefenweb/ansible-playbooks/roles/sudoers
==> debian-84: Running provisioner: ansible...
debian-84: Running ansible-playbook...
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o IdentitiesOnly=yes -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --connection=ssh --timeout=30 --limit="debian-84" --inventory-file=/home/mtersmitten/Documents/checkouts/Oefenweb/ansible-playbooks/roles/sudoers/.vagrant/provisioners/ansible/inventory -vv tests/vagrant.yml
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
<127.0.0.1> REMOTE_MODULE setup
ok: [debian-84]
TASK: [../../ | install] ******************************************************
<127.0.0.1> REMOTE_MODULE apt cache_valid_time=3600 name=sudo state=latest
ok: [debian-84] => {"changed": false}
TASK: [../../ | update specific configuration files] **************************
changed: [debian-84] => (item={'key': 'vagrant', 'value': {'privileges': [{'entry': 'ALL=(ALL) NOPASSWD:ALL', 'name': 'vagrant'}]}}) => {"changed": true, "checksum": "c2bd935e66411aaf026a0d1da5de385c1d4ed2c0", "dest": "/etc/sudoers.d/vagrant", "gid": 0, "group": "root", "item": {"key": "vagrant", "value": {"privileges": [{"entry": "ALL=(ALL) NOPASSWD:ALL", "name": "vagrant"}]}}, "md5sum": "1c532955108da6887bf0c913e64cd80a", "mode": "0440", "owner": "root", "size": 201, "src": "/home/vagrant/.ansible/tmp/ansible-tmp-1467713440.01-69347169608197/source", "state": "file", "uid": 0}
TASK: [../../ | update global configuration file] *****************************
changed: [debian-84] => {"changed": true, "checksum": "3040c4b7120af63fce5ee9730bbc3949ebf9da14", "dest": "/etc/sudoers", "gid": 0, "group": "root", "md5sum": "2aafeb8747eef983a49926f151db3d70", "mode": "0440", "owner": "root", "size": 689, "src": "/home/vagrant/.ansible/tmp/ansible-tmp-1467713440.28-227578401927847/source", "state": "file", "uid": 0}
PLAY RECAP ********************************************************************
debian-84 : ok=4 changed=2 unreachable=0 failed=0
from ansible-sudoers.
Tested in both in Ansible 1.9.6 and 2.1.0.0
from ansible-sudoers.
Ok, thank you. I will debug further. I will let you know in this thread if I find something interesting.
from ansible-sudoers.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-sudoers.