Need some Ansible help
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    243
    Linux (Fedora) Firefox 61.0

    Need some Ansible help

    Thanks to an article on Fedora Magazine, I discovered Ansible today. I think this is a tool I really need to use. Since it has lots of varied capabilities I also think I need a book on Ansible. I see that there are several books available. What I need are some recommendation for a book that would be good for a beginner.

    Thanks in advance for your help.
    Have a Great Day!

  2. #2
    Join Date
    Jul 2017
    Location
    IL
    Posts
    399
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Hello TablePC.


    Try that one hope that will help you out.


    https://docs.ansible.com/ansible/lat...allation-guide
    FFedora

  3. #3
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    243
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Thanks, that is a big help.
    Have a Great Day!

  4. #4
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    243
    Linux (Fedora) Firefox 61.0

    Ansible DConf module

    I want to use Ansible to automate the setting of the Gnome-Control-Center and Gnome-Tweaks. I saw a single example in the article in Fedora Magazine for using a line in a playbook to set the night light on. They used a key "/org/gnome/settings-daemon/plugins/color/night-light-enabled".

    I'm thinking that I need a data dictionary that shows all the keys and their possible settings, but I can't find such a thing. My first question is does such a document exist? If not, I will appreciate some help figuring out what I need to know so I can use keys with Ansible to adjust the Gnome settings.

    Thanks in advance for your help in this.
    Have a Great Day!

  5. #5
    Join Date
    Jul 2004
    Location
    Colton, NY; Junction of Heaven & Earth (also Routes 56 & 68).
    Age
    73
    Posts
    23,592
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Threads merged. Please stick to one thread per topic.
    Linux & Beer - That TOTALLY Computes!
    Registered Linux User #362651


    Don't use any of my solutions on working computers or near small children.

  6. #6
    Join Date
    Jul 2017
    Location
    IL
    Posts
    399
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Hello TablePC.


    I think this is what you after:

    https://unix.stackexchange.com/quest.../400036#400036




    Yes, you can turn it on with

    Code:
    gsettings set org.gnome.settings-daemon.plugins.color night-light-enabled true
    or

    Code:
    dconf write /org/gnome/settings-daemon/plugins/color/night-light-enabled true
    Same commands with false instead of true will turn it off.
    FFedora

  7. #7
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    243
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Thanks for your help. I didn't know there were different ways to set the value of keys.

    There are several settings on Gnome I want to change, but I don't know the keys. How can I find out the keys and their possible values for the items in the gnome settings?

    Thanks in advance for your continued help in this.
    Have a Great Day!

  8. #8
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    3,003
    Linux (Fedora) Firefox 60.0

    Re: Need some Ansible help

    Typically when we have questions like
    How can I find out the keys and their possible values for the items in the gnome settings?
    we first try to read the man page(s) for the command. Another alternative is the info command for more detail on some commands. Failing that, then your search engine will almost certainly turn up something.

    If you don't know the command then you can search using the apropos command (or man -k 'search string').

    Don't be afraid to try things out. Linux is quite good at protecting itself from normal users. However, it might be worth setting up a second user that doesn't have any valuable data. Of course, if you run the command as root (eg with sudo) then all bets are off.

    If what you find in your research is indecipherable, then I am sure someone here will be able to explain it.

    User error. Please replace user and try again

  9. #9
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    243
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Thanks for your help.

    My problem isn't so much with learning how to set the various gnome keys. both DConf through Ansible and gsettings by it self through the command line seem quite straightforward.

    I was really looking for the documentation for the keys themselves. That is what they do individually and what the acceptable range of values is that each key can be set to. There are literally hundreds of gnome keys contained in the various gnome shemas and none of them, as far as I can see are documented in the DConf or gsettings man or info pages.

    I haven't been able to find what I was looking for so I've actually started creating the documentation (for now I just started one of the Gnome schemas). I've posted it at the Gnome gitlab site as an issue with an explanation of what I'm looking for or hoping to create. I suspect I've bitten off a big project unless they tell me the document already exists.

    I'll post back here so others who may be interested can follow.

    Thanks again and Have a Great Day!
    !
    Have a Great Day!

  10. #10
    Join Date
    Oct 2006
    Location
    CN99CF Agassiz BC Canada
    Posts
    400
    Linux (Fedora) Firefox 60.0

    Re: Need some Ansible help

    Quote Originally Posted by TablePC
    T
    I was really looking for the documentation for the keys themselves. That is what they do individually and what the acceptable range of values is that each key can be set to. There are literally hundreds of gnome keys contained in the various gnome shemas and none of them, as far as I can see are documented in the DConf or gsettings man or info pages.
    !
    The only documentation I have found for the acceptable values is contained in the schema files. These are found at
    Code:
    /usr/share/glib-2.0/schemas/*
    They are supposed to work as key help in dconf-editor or you can parse one of the schema files and get the keys and associated value sets.

    Reminds me of the days of 'self-documenting code' rather than taking the time for creating documentation of the various use cases.
    -----
    f26 x86_64 Acer Predator G5910 Quad core Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz

  11. #11
    Join Date
    Jul 2017
    Location
    IL
    Posts
    399
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Here you have the User Guide hope that will help.


    Welcome to the Ansible User Guide!

    https://docs.ansible.com/ansible/2.5...ide/index.html
    FFedora

  12. #12
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    243
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    The path to the schemas was very helpful. I found the data type and limits information I was looking for and I've updated the portion of the document I started. Now I just need to figure out how to correlate the keys with their application. Hopefully without reviewing all the source code for gnome-control-center.

    Thanks for the reference to the Ansible user's guide too. As it turns out I have a bunch of work to do before I can start writing an ansible playbook to automate the gnome-control-center and gnome-tweaks settings.
    Last edited by TablePC; 13th July 2018 at 10:03 PM.
    Have a Great Day!

  13. #13
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    243
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    The latest is that there is a dconf-editor which can be installed from the fedora repo. Have to be careful with it because an unfortunate change could cause serious problems. I won't be using it to edit keys but to find out what keys are involved with things I want to change via Ansible during a PC reload.

    There is also a (dconf dump) command which apparently can be used to see all of the keys that have been changed from their default. Since I already have the keys set as I want them via the gnome-control-panel and gnome-tweaks I should be able to find all the keys I need to add to my Ansible playbook. The catch is I haven't been able to get the dconf dump command to work yet, but that's just a matter of time.

    There will be more to come.
    Have a Great Day!

  14. #14
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    243
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Yeah! with the help of some other posts on the web I found out how to get the dconf dump to work. To dump all modified keys with Schemas and values into a file "dump.dconf" in your home directory, at the command line: "dconf dump / > dump.dconf".

    This is just what I needed. I opened it with LibriOffice and prettied it up some and saved it. Now I can use it quite easily to make the Ansible Playbook I need. Here's some snips of the file so you can see what is provided:

    [org/gnome/settings-daemon/plugins/power]
    power-button-action='interactive'
    sleep-inactive-battery-type='nothing'
    sleep-inactive-ac-timeout=3600
    sleep-inactive-ac-type='nothing'
    sleep-inactive-battery-timeout=1800

    [org/gnome/settings-daemon/plugins/color]
    night-light-enabled=true

    [org/gnome/desktop/interface]
    gtk-enable-primary-paste=false
    cursor-size=32
    clock-format='12h'
    document-font-name='Caladea 18'
    cursor-theme='Bluecurve'
    toolkit-accessibility=false
    font-name='Caladea 19'
    clock-show-seconds=true
    gtk-im-module='gtk-im-context-simple'
    icon-theme='Bluecurve'
    monospace-font-name='Monospace 19'
    clock-show-date=true

    Just a sample, saved as an odt file in landscape with the text at 16pt the full list of keys I have modified is 20 pages long. I still can't correlate keys with control-panel or gnome-tweaks widgets precisely, but most can be identified indirectly. The widget correlation doesn't seem so important now since with the information provided I can tell what the keys do in all but a few cases.

    Building the playbook will take some time, but I won't be clicking so many widgets when I load F29. I'll just start my playbook.

    I am greatful to all the people who helped here, at gitlab gnome, and the author of the Fedora Magazine article on Ansible (Link DuPont) who provided the breakthrough information.
    Have a Great Day!

  15. #15
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    243
    Linux (Fedora) Firefox 61.0

    Re: Need some Ansible help

    Just for grins, I made a count of the modified schemas I found in my fully configured system and there are 69. Then I got curious about how many there would be in an new system that I had not made any settings to. I made a clean install of F28 to my bare metal test system. the clean means all disk space was reclaimed. Then I did my standard software shuffle by uninstalling things not needed and installing things that are needed. All installations are from the Fedora repo for F28.
    Then I did a dconf dump for that system. The newly installed system has a total of 22 modified schemas. My guess is that some or all of these are modified during various software installs to establish defaults.

    Then I went through both dumps (fully configured system and new system with no settings made) to see how much overlap there is. All 22 schemas in the new system dump were in the fully configured system dump. As it turns out there were only 9 schemas where the key settings were identical between the two dumps. Well at least I know that there are only 60 schemas I need to handle in my playbook.
    Have a Great Day!

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •