DEV Community

Roy
Roy

Posted on • Updated on

cannot put comments on the same line with instruction in ansible.cfg

I configure ~/.ansible.cfg

fact_caching_timeout = 86400 # seconds

and when I run playbook, I get an error

ValueError: invalid literal for int() with base 10: '86400 # seconds'

Comments The configuration file is one variant of an INI format. Both the hash sign (“#”) and semicolon (”;”) are allowed as comment markers when the comment starts the line. However, if the comment is inline with regular values, only the semicolon is allowed to introduce the comment. For instance:

# some basic default values...
inventory = /etc/ansible/hosts  ; This points to the file that lists your hosts

Top comments (1)

Collapse
 
chloe999 profile image
chloe decker

Follow me on this wonderful website and find file explorer windows 10 here you easily get the missing file.