Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible 2.7: Invalid options for reboot: reboot_timeout #47031

Closed
programingnotes opened this issue Oct 14, 2018 · 4 comments
Closed

Ansible 2.7: Invalid options for reboot: reboot_timeout #47031

programingnotes opened this issue Oct 14, 2018 · 4 comments
Assignees
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@programingnotes
Copy link

SUMMARY

According to the docs for reboot module in Ansible 2.7, reboot_timeout is a valid option for the reboot module. Yet, this task:

- name: Reboot a slow machine that might have lots of updates to apply
  reboot:
    reboot_timeout: 3600

returns:

FAILED! => {"changed": false, "msg": "Invalid options for reboot: reboot_timeout"}
ISSUE TYPE
  • Bug Report
COMPONENT NAME
ANSIBLE VERSION
ansible 2.7.0
  config file = /Users/pnotes/example/ansible/ansible.cfg
  configured module search path = ['/Users/pnotes/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/pnotes/.pyenv/versions/3.6.4/lib/python3.6/site-packages/ansible
  executable location = /Users/pnotes/.pyenv/versions/3.6.4/bin/ansible
  python version = 3.6.4 (default, Feb 26 2018, 21:07:35) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
CONFIGURATION
DEFAULT_HOST_LIST(/Users/pnotes/example/ansible/ansible.cfg) = ['/Users/pnotes/example/ansible/inventories/test/hosts.ini']
DEFAULT_VAULT_PASSWORD_FILE(/Users/pnotes/example/ansible/ansible.cfg) = /Users/pnotes/.vault_pass.txt
OS / ENVIRONMENT

target OS versions => Ubuntu 16.04tls

STEPS TO REPRODUCE

Given this directory structure:

├── ansible.cfg
├── inventories
│   └── test
│       └── hosts.ini
├── provision.yml
└── roles
    └── sample
        ├── handlers
        │   └── main.yml
        └── tasks
            └── main.yml

with And roles/sample/tasks/main.yml defined like so:

- name: Update Linux Distribution Software (apt update && apt upgrade && apt autoremove)
  apt:
    upgrade: yes  # upgrade: 'dist'
    update_cache: yes
    autoremove: yes #this isn't working, need to change it
    dpkg_options: 'force-confold,force-confdef'  
    allow_unauthenticated: no

- name: Set Timezone to USA/NewYork
  timezone: 
    name: America/New_York

roles/sample/handlers/main.yml defined like so:

- name: Reboot machine 
  reboot: 
    reboot_timeout: 3600
    test_command: whoami
  notify:
    - Restart sshd
EXPECTED RESULTS

I expect the handler, Reboot machine, defined above to return either elapsed or rebooted

ACTUAL RESULTS

but instead the error message

FAILED! => {"changed": false, "msg": "Invalid options for reboot: reboot_timeout"}

is returned

@ansibot
Copy link
Contributor

ansibot commented Oct 15, 2018

Hi @programingnotes, thank you for submitting this issue!

click here for bot help

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 15, 2018
@Akasurde
Copy link
Member

@programingnotes PR is merged - #46585, will be available for 2.7.1 release. Thanks.

@Akasurde Akasurde added has_pr This issue has an associated PR. and removed needs_triage Needs a first human triage before being processed. labels Oct 15, 2018
@Akasurde
Copy link
Member

cc @samdoran @nitzmahone

@samdoran samdoran self-assigned this Oct 15, 2018
@samdoran
Copy link
Contributor

This was fixed in a0f38bd and will be in Ansible 2.7.1.

jaywcarman added a commit to jaywcarman/power-up that referenced this issue Dec 6, 2018
Need fix for Ansible issue #47031
(ansible/ansible#47031).
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

4 participants