Page MenuHomeDevCentral

Migrate the Salt states and modules to Python 3
ClosedPublic

Authored by dereckson on Feb 28 2018, 12:57.
Tags
None
Referenced Files
F3753489: D1355.id3464.diff
Mon, Nov 18, 02:10
Unknown Object (File)
Tue, Nov 12, 05:58
Unknown Object (File)
Sat, Nov 9, 14:59
Unknown Object (File)
Fri, Nov 8, 01:16
Unknown Object (File)
Fri, Nov 8, 00:57
Unknown Object (File)
Thu, Nov 7, 13:22
Unknown Object (File)
Sun, Oct 27, 18:56
Unknown Object (File)
Oct 19 2024, 05:40
Subscribers
None

Details

Summary

Ref T1343.

Test Plan
  • Run unit tests for modules
  • Run modified modules functions
  • Run in test mode modified states

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.

Tests units pass.

This part currently committed works fine.

I've still to check the viperserv role's account unit: in roles/viperserv/account/init.sls and roles/viperserv/account/files/viperserv.sudoers, a string is iterated letter by letter.

Ysul
$ salt-call --local node.filter_by_role web_content_sls
local:
    - .be/dereckson
    - .org/nasqueron/api
    - .org/nasqueron/docs
    - .org/nasqueron/labs

$ salt-call --local state.apply roles/bastion/yubico/authorized_yubikeys test=True
[…]
Succeeded: 2
Failed:    0
[…]

$ salt-call --local forest.get_users
[dictionary with the correct users list]

$ salt-call --local state.apply roles/core/users test=True
[dictionaries are correctly iterated]

$ salt-call --local state.apply roles/devserver/webserver-wwwroot51 test=True
[dictionaries are correctly iterated]
Succeeded: 7
Failed:    0
[…]

$ salt-call --local state.apply roles/viperserv/account test=True
[a string is parsed as an iterable in the the sudoers template]

$ salt-call --local state.apply roles/webserver-legacy/php-sites/account test=True
[dictionaries are correctly iterated]

$ salt-call --local state.apply roles/webserver-legacy/php-sites/files test=True
[dictionaries are correctly iterated]

$ salt-call --local state.apply roles/webserver-legacy/php-sites/php-fpm test=True
[dictionaries are correctly iterated]

'''Notes :'''

  • www.dereckson.be files in /var/wwwroot/dereckson/www don't match staging
  • users states aren't executed in Ysul, pending ZFS /home configuration
This revision is now accepted and ready to land.Feb 28 2018, 13:22
This revision was automatically updated to reflect the committed changes.